home *** CD-ROM | disk | FTP | other *** search
/ Ultra Pack / UltraComputing Partner Applications.iso / SunLabs / tclTK / src / tcl7.4.tar next >
Tape Archive  |  1996-03-03  |  1.8 MB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Tape Archive (archive/tar).

You can browse this item here: tcl7.4.tar

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Tape Archive (archive/tar) magic Supported
100% file POSIX tar archive default
99% file POSIX tar archive, directory tcl7.4/, mode 0040775, uid 0063051, gid 0000012, size 00000000000, seconds 05775040205, user ouster, group staff, devmaj 0000234, devmin 0000010 default
98% file data default
41% TrID Sybase iAnywhere database files default (weak)
36% TrID TAR - Tape ARchive (POSIX) default
21% TrID TAR - Tape ARchive (directory) default
100% siegfried x-fmt/265 Tape Archive Format default
100% lsar Tar default
100% gt2 TAR Archiv gefunden (Auflistung ist deaktiviert) default
100% disktype POSIX tar archive default
100% detectItEasy Archive: tar default
100% binwalkID POSIX tar archive default
100% xdgMime application/x-tar default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 74 63 6c 37 2e 34 2f 00 | 00 00 00 00 00 00 00 00 |tcl7.4/.|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 30 30 34 30 | 37 37 35 00 30 30 36 33 |....0040|775.0063|
|00000070| 30 35 31 00 30 30 30 30 | 30 31 32 00 30 30 30 30 |051.0000|012.0000|
|00000080| 30 30 30 30 30 30 30 00 | 30 35 37 37 35 30 34 30 |0000000.|05775040|
|00000090| 32 30 35 00 30 30 31 32 | 36 31 33 00 35 00 00 00 |205.0012|613.5...|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 75 73 74 61 72 00 30 | 30 6f 75 73 74 65 72 00 |.ustar.0|0ouster.|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 73 74 61 66 66 00 00 |........|.staff..|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 30 30 30 30 32 33 34 |........|.0000234|
|00000150| 00 30 30 30 30 30 31 30 | 00 00 00 00 00 00 00 00 |.0000010|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 74 63 6c 37 2e 34 2f 4d | 61 6b 65 66 69 6c 65 2e |tcl7.4/M|akefile.|
|00000210| 69 6e 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |in......|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 30 31 30 30 | 36 36 34 00 30 30 36 33 |....0100|664.0063|
|00000270| 30 35 31 00 30 30 30 30 | 30 31 32 00 30 30 30 30 |051.0000|012.0000|
|00000280| 30 30 32 36 32 31 37 00 | 30 35 37 37 35 30 34 30 |0026217.|05775040|
|00000290| 31 32 34 00 30 30 31 34 | 36 36 35 00 30 00 00 00 |124.0014|665.0...|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 75 73 74 61 72 00 30 | 30 6f 75 73 74 65 72 00 |.ustar.0|0ouster.|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 73 74 61 66 66 00 00 |........|.staff..|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 30 30 30 30 32 33 34 |........|.0000234|
|00000350| 00 30 30 30 30 30 31 30 | 00 00 00 00 00 00 00 00 |.0000010|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 23 0a 23 20 54 68 69 73 | 20 66 69 6c 65 20 69 73 |#.# This| file is|
|00000410| 20 61 20 4d 61 6b 65 66 | 69 6c 65 20 66 6f 72 20 | a Makef|ile for |
|00000420| 54 63 6c 2e 20 20 49 66 | 20 69 74 20 68 61 73 20 |Tcl. If| it has |
|00000430| 74 68 65 20 6e 61 6d 65 | 20 22 4d 61 6b 65 66 69 |the name| "Makefi|
|00000440| 6c 65 2e 69 6e 22 0a 23 | 20 74 68 65 6e 20 69 74 |le.in".#| then it|
|00000450| 20 69 73 20 61 20 74 65 | 6d 70 6c 61 74 65 20 66 | is a te|mplate f|
|00000460| 6f 72 20 61 20 4d 61 6b | 65 66 69 6c 65 3b 20 20 |or a Mak|efile; |
|00000470| 74 6f 20 67 65 6e 65 72 | 61 74 65 20 74 68 65 20 |to gener|ate the |
|00000480| 61 63 74 75 61 6c 20 4d | 61 6b 65 66 69 6c 65 2c |actual M|akefile,|
|00000490| 0a 23 20 72 75 6e 20 22 | 2e 2f 63 6f 6e 66 69 67 |.# run "|./config|
|000004a0| 75 72 65 22 2c 20 77 68 | 69 63 68 20 69 73 20 61 |ure", wh|ich is a|
|000004b0| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 73 | configu|ration s|
|000004c0| 63 72 69 70 74 20 67 65 | 6e 65 72 61 74 65 64 20 |cript ge|nerated |
|000004d0| 62 79 20 74 68 65 0a 23 | 20 22 61 75 74 6f 63 6f |by the.#| "autoco|
|000004e0| 6e 66 22 20 70 72 6f 67 | 72 61 6d 20 28 63 6f 6e |nf" prog|ram (con|
|000004f0| 73 74 72 75 63 74 73 20 | 6c 69 6b 65 20 22 40 66 |structs |like "@f|
|00000500| 6f 6f 40 22 20 77 69 6c | 6c 20 67 65 74 20 72 65 |oo@" wil|l get re|
|00000510| 70 6c 61 63 65 64 20 69 | 6e 20 74 68 65 0a 23 20 |placed i|n the.# |
|00000520| 61 63 74 75 61 6c 20 4d | 61 6b 65 66 69 6c 65 2e |actual M|akefile.|
|00000530| 0a 23 0a 23 20 40 28 23 | 29 20 4d 61 6b 65 66 69 |.#.# @(#|) Makefi|
|00000540| 6c 65 2e 69 6e 20 31 2e | 32 33 20 39 35 2f 30 36 |le.in 1.|23 95/06|
|00000550| 2f 30 38 20 31 33 3a 31 | 33 3a 33 36 0a 0a 23 20 |/08 13:1|3:36..# |
|00000560| 43 75 72 72 65 6e 74 20 | 54 63 6c 20 76 65 72 73 |Current |Tcl vers|
|00000570| 69 6f 6e 3b 20 20 75 73 | 65 64 20 69 6e 20 76 61 |ion; us|ed in va|
|00000580| 72 69 6f 75 73 20 6e 61 | 6d 65 73 2e 0a 0a 56 45 |rious na|mes...VE|
|00000590| 52 53 49 4f 4e 20 3d 20 | 37 2e 34 0a 0a 23 2d 2d |RSION = |7.4..#--|
|000005a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000005b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000005c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000005d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0a 23 |--------|------.#|
|000005e0| 20 54 68 69 6e 67 73 20 | 79 6f 75 20 63 61 6e 20 | Things |you can |
|000005f0| 63 68 61 6e 67 65 20 74 | 6f 20 70 65 72 73 6f 6e |change t|o person|
|00000600| 61 6c 69 7a 65 20 74 68 | 65 20 4d 61 6b 65 66 69 |alize th|e Makefi|
|00000610| 6c 65 20 66 6f 72 20 79 | 6f 75 72 20 6f 77 6e 0a |le for y|our own.|
|00000620| 23 20 73 69 74 65 20 28 | 79 6f 75 20 63 61 6e 20 |# site (|you can |
|00000630| 6d 61 6b 65 20 74 68 65 | 73 65 20 63 68 61 6e 67 |make the|se chang|
|00000640| 65 73 20 69 6e 20 65 69 | 74 68 65 72 20 4d 61 6b |es in ei|ther Mak|
|00000650| 65 66 69 6c 65 2e 69 6e | 20 6f 72 0a 23 20 4d 61 |efile.in| or.# Ma|
|00000660| 6b 65 66 69 6c 65 2c 20 | 62 75 74 20 63 68 61 6e |kefile, |but chan|
|00000670| 67 65 73 20 74 6f 20 4d | 61 6b 65 66 69 6c 65 20 |ges to M|akefile |
|00000680| 77 69 6c 6c 20 67 65 74 | 20 6c 6f 73 74 20 69 66 |will get| lost if|
|00000690| 20 79 6f 75 20 72 65 2d | 72 75 6e 0a 23 20 74 68 | you re-|run.# th|
|000006a0| 65 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |e config|uration |
|000006b0| 73 63 72 69 70 74 29 2e | 0a 23 2d 2d 2d 2d 2d 2d |script).|.#------|
|000006c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0a 0a 23 20 44 65 |--------|--..# De|
|00000700| 66 61 75 6c 74 20 74 6f | 70 2d 6c 65 76 65 6c 20 |fault to|p-level |
|00000710| 64 69 72 65 63 74 6f 72 | 69 65 73 20 69 6e 20 77 |director|ies in w|
|00000720| 68 69 63 68 20 74 6f 20 | 69 6e 73 74 61 6c 6c 20 |hich to |install |
|00000730| 61 72 63 68 69 74 65 63 | 74 75 72 65 2d 0a 23 20 |architec|ture-.# |
|00000740| 73 70 65 63 69 66 69 63 | 20 66 69 6c 65 73 20 28 |specific| files (|
|00000750| 65 78 65 63 5f 70 72 65 | 66 69 78 29 20 61 6e 64 |exec_pre|fix) and|
|00000760| 20 6d 61 63 68 69 6e 65 | 2d 69 6e 64 65 70 65 6e | machine|-indepen|
|00000770| 64 65 6e 74 20 66 69 6c | 65 73 20 73 75 63 68 0a |dent fil|es such.|
|00000780| 23 20 61 73 20 73 63 72 | 69 70 74 73 20 28 70 72 |# as scr|ipts (pr|
|00000790| 65 66 69 78 29 2e 20 20 | 54 68 65 20 76 61 6c 75 |efix). |The valu|
|000007a0| 65 73 20 73 70 65 63 69 | 66 69 65 64 20 68 65 72 |es speci|fied her|
|000007b0| 65 20 6d 61 79 20 62 65 | 20 6f 76 65 72 72 69 64 |e may be| overrid|
|000007c0| 64 65 6e 0a 23 20 61 74 | 20 63 6f 6e 66 69 67 75 |den.# at| configu|
|000007d0| 72 65 2d 74 69 6d 65 20 | 77 69 74 68 20 74 68 65 |re-time |with the|
|000007e0| 20 2d 2d 65 78 65 63 2d | 70 72 65 66 69 78 20 61 | --exec-|prefix a|
|000007f0| 6e 64 20 2d 2d 70 72 65 | 66 69 78 20 6f 70 74 69 |nd --pre|fix opti|
|00000800| 6f 6e 73 0a 23 20 74 6f | 20 74 68 65 20 22 63 6f |ons.# to| the "co|
|00000810| 6e 66 69 67 75 72 65 22 | 20 73 63 72 69 70 74 2e |nfigure"| script.|
|00000820| 0a 0a 70 72 65 66 69 78 | 20 3d 09 40 70 72 65 66 |..prefix| =.@pref|
|00000830| 69 78 40 0a 65 78 65 63 | 5f 70 72 65 66 69 78 20 |ix@.exec|_prefix |
|00000840| 3d 09 40 65 78 65 63 5f | 70 72 65 66 69 78 40 0a |=.@exec_|prefix@.|
|00000850| 0a 23 20 54 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |.# The f|ollowing|
|00000860| 20 64 65 66 69 6e 69 74 | 69 6f 6e 20 63 61 6e 20 | definit|ion can |
|00000870| 62 65 20 73 65 74 20 74 | 6f 20 6e 6f 6e 2d 6e 75 |be set t|o non-nu|
|00000880| 6c 6c 20 66 6f 72 20 73 | 70 65 63 69 61 6c 20 73 |ll for s|pecial s|
|00000890| 79 73 74 65 6d 73 0a 23 | 20 6c 69 6b 65 20 41 46 |ystems.#| like AF|
|000008a0| 53 20 77 69 74 68 20 72 | 65 70 6c 69 63 61 74 69 |S with r|eplicati|
|000008b0| 6f 6e 2e 20 20 49 74 20 | 61 6c 6c 6f 77 73 20 74 |on. It |allows t|
|000008c0| 68 65 20 70 61 74 68 6e | 61 6d 65 73 20 75 73 65 |he pathn|ames use|
|000008d0| 64 20 66 6f 72 20 69 6e | 73 74 61 6c 6c 61 74 69 |d for in|stallati|
|000008e0| 6f 6e 0a 23 20 74 6f 20 | 62 65 20 64 69 66 66 65 |on.# to |be diffe|
|000008f0| 72 65 6e 74 20 74 68 61 | 6e 20 74 68 6f 73 65 20 |rent tha|n those |
|00000900| 75 73 65 64 20 66 6f 72 | 20 61 63 74 75 61 6c 6c |used for| actuall|
|00000910| 79 20 72 65 66 65 72 65 | 6e 63 65 20 66 69 6c 65 |y refere|nce file|
|00000920| 73 20 61 74 0a 23 20 72 | 75 6e 2d 74 69 6d 65 2e |s at.# r|un-time.|
|00000930| 20 20 49 4e 53 54 41 4c | 4c 5f 52 4f 4f 54 20 69 | INSTAL|L_ROOT i|
|00000940| 73 20 70 72 65 70 65 6e | 64 65 64 20 74 6f 20 24 |s prepen|ded to $|
|00000950| 70 72 65 66 69 78 20 61 | 6e 64 20 24 65 78 65 63 |prefix a|nd $exec|
|00000960| 5f 70 72 65 66 69 78 0a | 23 20 77 68 65 6e 20 69 |_prefix.|# when i|
|00000970| 6e 73 74 61 6c 6c 69 6e | 67 20 66 69 6c 65 73 2e |nstallin|g files.|
|00000980| 0a 49 4e 53 54 41 4c 4c | 5f 52 4f 4f 54 20 3d 0a |.INSTALL|_ROOT =.|
|00000990| 0a 23 20 44 69 72 65 63 | 74 6f 72 79 20 66 72 6f |.# Direc|tory fro|
|000009a0| 6d 20 77 68 69 63 68 20 | 61 70 70 6c 69 63 61 74 |m which |applicat|
|000009b0| 69 6f 6e 73 20 77 69 6c | 6c 20 72 65 66 65 72 65 |ions wil|l refere|
|000009c0| 6e 63 65 20 74 68 65 20 | 6c 69 62 72 61 72 79 20 |nce the |library |
|000009d0| 6f 66 20 54 63 6c 0a 23 | 20 73 63 72 69 70 74 73 |of Tcl.#| scripts|
|000009e0| 20 28 6e 6f 74 65 3a 20 | 79 6f 75 20 63 61 6e 20 | (note: |you can |
|000009f0| 73 65 74 20 74 68 65 20 | 54 43 4c 5f 4c 49 42 52 |set the |TCL_LIBR|
|00000a00| 41 52 59 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 20 |ARY envi|ronment |
|00000a10| 76 61 72 69 61 62 6c 65 | 20 61 74 0a 23 20 72 75 |variable| at.# ru|
|00000a20| 6e 2d 74 69 6d 65 20 74 | 6f 20 6f 76 65 72 72 69 |n-time t|o overri|
|00000a30| 64 65 20 74 68 69 73 20 | 76 61 6c 75 65 29 3a 0a |de this |value):.|
|00000a40| 54 43 4c 5f 4c 49 42 52 | 41 52 59 20 3d 09 24 28 |TCL_LIBR|ARY =.$(|
|00000a50| 70 72 65 66 69 78 29 2f | 6c 69 62 2f 74 63 6c 24 |prefix)/|lib/tcl$|
|00000a60| 28 56 45 52 53 49 4f 4e | 29 0a 0a 23 20 50 61 74 |(VERSION|)..# Pat|
|00000a70| 68 20 6e 61 6d 65 20 74 | 6f 20 75 73 65 20 77 68 |h name t|o use wh|
|00000a80| 65 6e 20 69 6e 73 74 61 | 6c 6c 69 6e 67 20 6c 69 |en insta|lling li|
|00000a90| 62 72 61 72 79 20 73 63 | 72 69 70 74 73 3a 0a 53 |brary sc|ripts:.S|
|00000aa0| 43 52 49 50 54 5f 49 4e | 53 54 41 4c 4c 5f 44 49 |CRIPT_IN|STALL_DI|
|00000ab0| 52 20 3d 09 24 28 49 4e | 53 54 41 4c 4c 5f 52 4f |R =.$(IN|STALL_RO|
|00000ac0| 4f 54 29 24 28 54 43 4c | 5f 4c 49 42 52 41 52 59 |OT)$(TCL|_LIBRARY|
|00000ad0| 29 0a 0a 23 20 44 69 72 | 65 63 74 6f 72 79 20 69 |)..# Dir|ectory i|
|00000ae0| 6e 20 77 68 69 63 68 20 | 74 6f 20 69 6e 73 74 61 |n which |to insta|
|00000af0| 6c 6c 20 74 68 65 20 61 | 72 63 68 69 76 65 20 6c |ll the a|rchive l|
|00000b00| 69 62 74 63 6c 2e 61 3a | 0a 4c 49 42 5f 49 4e 53 |ibtcl.a:|.LIB_INS|
|00000b10| 54 41 4c 4c 5f 44 49 52 | 20 3d 09 24 28 49 4e 53 |TALL_DIR| =.$(INS|
|00000b20| 54 41 4c 4c 5f 52 4f 4f | 54 29 24 28 65 78 65 63 |TALL_ROO|T)$(exec|
|00000b30| 5f 70 72 65 66 69 78 29 | 2f 6c 69 62 0a 0a 23 20 |_prefix)|/lib..# |
|00000b40| 44 69 72 65 63 74 6f 72 | 79 20 69 6e 20 77 68 69 |Director|y in whi|
|00000b50| 63 68 20 74 6f 20 69 6e | 73 74 61 6c 6c 20 74 68 |ch to in|stall th|
|00000b60| 65 20 70 72 6f 67 72 61 | 6d 20 74 63 6c 73 68 3a |e progra|m tclsh:|
|00000b70| 0a 42 49 4e 5f 49 4e 53 | 54 41 4c 4c 5f 44 49 52 |.BIN_INS|TALL_DIR|
|00000b80| 20 3d 09 24 28 49 4e 53 | 54 41 4c 4c 5f 52 4f 4f | =.$(INS|TALL_ROO|
|00000b90| 54 29 24 28 65 78 65 63 | 5f 70 72 65 66 69 78 29 |T)$(exec|_prefix)|
|00000ba0| 2f 62 69 6e 0a 0a 23 20 | 44 69 72 65 63 74 6f 72 |/bin..# |Director|
|00000bb0| 79 20 69 6e 20 77 68 69 | 63 68 20 74 6f 20 69 6e |y in whi|ch to in|
|00000bc0| 73 74 61 6c 6c 20 74 68 | 65 20 69 6e 63 6c 75 64 |stall th|e includ|
|00000bd0| 65 20 66 69 6c 65 20 74 | 63 6c 2e 68 3a 0a 49 4e |e file t|cl.h:.IN|
|00000be0| 43 4c 55 44 45 5f 49 4e | 53 54 41 4c 4c 5f 44 49 |CLUDE_IN|STALL_DI|
|00000bf0| 52 20 3d 09 24 28 49 4e | 53 54 41 4c 4c 5f 52 4f |R =.$(IN|STALL_RO|
|00000c00| 4f 54 29 24 28 70 72 65 | 66 69 78 29 2f 69 6e 63 |OT)$(pre|fix)/inc|
|00000c10| 6c 75 64 65 0a 0a 23 20 | 54 6f 70 2d 6c 65 76 65 |lude..# |Top-leve|
|00000c20| 6c 20 64 69 72 65 63 74 | 6f 72 79 20 69 6e 20 77 |l direct|ory in w|
|00000c30| 68 69 63 68 20 74 6f 20 | 69 6e 73 74 61 6c 6c 20 |hich to |install |
|00000c40| 6d 61 6e 75 61 6c 20 65 | 6e 74 72 69 65 73 3a 0a |manual e|ntries:.|
|00000c50| 4d 41 4e 5f 49 4e 53 54 | 41 4c 4c 5f 44 49 52 20 |MAN_INST|ALL_DIR |
|00000c60| 3d 09 24 28 49 4e 53 54 | 41 4c 4c 5f 52 4f 4f 54 |=.$(INST|ALL_ROOT|
|00000c70| 29 24 28 70 72 65 66 69 | 78 29 2f 6d 61 6e 0a 0a |)$(prefi|x)/man..|
|00000c80| 23 20 44 69 72 65 63 74 | 6f 72 79 20 69 6e 20 77 |# Direct|ory in w|
|00000c90| 68 69 63 68 20 74 6f 20 | 69 6e 73 74 61 6c 6c 20 |hich to |install |
|00000ca0| 6d 61 6e 75 61 6c 20 65 | 6e 74 72 79 20 66 6f 72 |manual e|ntry for|
|00000cb0| 20 74 63 6c 73 68 3a 0a | 4d 41 4e 31 5f 49 4e 53 | tclsh:.|MAN1_INS|
|00000cc0| 54 41 4c 4c 5f 44 49 52 | 20 3d 09 24 28 4d 41 4e |TALL_DIR| =.$(MAN|
|00000cd0| 5f 49 4e 53 54 41 4c 4c | 5f 44 49 52 29 2f 6d 61 |_INSTALL|_DIR)/ma|
|00000ce0| 6e 31 0a 0a 23 20 44 69 | 72 65 63 74 6f 72 79 20 |n1..# Di|rectory |
|00000cf0| 69 6e 20 77 68 69 63 68 | 20 74 6f 20 69 6e 73 74 |in which| to inst|
|00000d00| 61 6c 6c 20 6d 61 6e 75 | 61 6c 20 65 6e 74 72 69 |all manu|al entri|
|00000d10| 65 73 20 66 6f 72 20 54 | 63 6c 27 73 20 43 20 6c |es for T|cl's C l|
|00000d20| 69 62 72 61 72 79 0a 23 | 20 70 72 6f 63 65 64 75 |ibrary.#| procedu|
|00000d30| 72 65 73 3a 0a 4d 41 4e | 33 5f 49 4e 53 54 41 4c |res:.MAN|3_INSTAL|
|00000d40| 4c 5f 44 49 52 20 3d 09 | 24 28 4d 41 4e 5f 49 4e |L_DIR =.|$(MAN_IN|
|00000d50| 53 54 41 4c 4c 5f 44 49 | 52 29 2f 6d 61 6e 33 0a |STALL_DI|R)/man3.|
|00000d60| 0a 23 20 44 69 72 65 63 | 74 6f 72 79 20 69 6e 20 |.# Direc|tory in |
|00000d70| 77 68 69 63 68 20 74 6f | 20 69 6e 73 74 61 6c 6c |which to| install|
|00000d80| 20 6d 61 6e 75 61 6c 20 | 65 6e 74 72 69 65 73 20 | manual |entries |
|00000d90| 66 6f 72 20 74 68 65 20 | 62 75 69 6c 74 2d 69 6e |for the |built-in|
|00000da0| 0a 23 20 54 63 6c 20 63 | 6f 6d 6d 61 6e 64 73 3a |.# Tcl c|ommands:|
|00000db0| 0a 4d 41 4e 4e 5f 49 4e | 53 54 41 4c 4c 5f 44 49 |.MANN_IN|STALL_DI|
|00000dc0| 52 20 3d 09 24 28 4d 41 | 4e 5f 49 4e 53 54 41 4c |R =.$(MA|N_INSTAL|
|00000dd0| 4c 5f 44 49 52 29 2f 6d | 61 6e 6e 0a 0a 23 20 54 |L_DIR)/m|ann..# T|
|00000de0| 6f 20 63 68 61 6e 67 65 | 20 74 68 65 20 63 6f 6d |o change| the com|
|00000df0| 70 69 6c 65 72 20 73 77 | 69 74 63 68 65 73 2c 20 |piler sw|itches, |
|00000e00| 66 6f 72 20 65 78 61 6d | 70 6c 65 20 74 6f 20 63 |for exam|ple to c|
|00000e10| 68 61 6e 67 65 20 66 72 | 6f 6d 20 2d 4f 0a 23 20 |hange fr|om -O.# |
|00000e20| 74 6f 20 2d 67 2c 20 63 | 68 61 6e 67 65 20 74 68 |to -g, c|hange th|
|00000e30| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 6c 69 6e 65 |e follow|ing line|
|00000e40| 3a 0a 43 46 4c 41 47 53 | 20 3d 20 2d 4f 0a 0a 23 |:.CFLAGS| = -O..#|
|00000e50| 20 54 6f 20 64 69 73 61 | 62 6c 65 20 41 4e 53 49 | To disa|ble ANSI|
|00000e60| 2d 43 20 70 72 6f 63 65 | 64 75 72 65 20 70 72 6f |-C proce|dure pro|
|00000e70| 74 6f 74 79 70 65 73 20 | 72 65 76 65 72 73 65 20 |totypes |reverse |
|00000e80| 74 68 65 20 63 6f 6d 6d | 65 6e 74 20 63 68 61 72 |the comm|ent char|
|00000e90| 61 63 74 65 72 73 0a 23 | 20 6f 6e 20 74 68 65 20 |acters.#| on the |
|00000ea0| 66 6f 6c 6c 6f 77 69 6e | 67 20 6c 69 6e 65 73 3a |followin|g lines:|
|00000eb0| 0a 50 52 4f 54 4f 5f 46 | 4c 41 47 53 20 3d 0a 23 |.PROTO_F|LAGS =.#|
|00000ec0| 50 52 4f 54 4f 5f 46 4c | 41 47 53 20 3d 20 2d 44 |PROTO_FL|AGS = -D|
|00000ed0| 4e 4f 5f 50 52 4f 54 4f | 54 59 50 45 0a 0a 23 20 |NO_PROTO|TYPE..# |
|00000ee0| 4d 61 74 68 65 6d 61 74 | 69 63 61 6c 20 66 75 6e |Mathemat|ical fun|
|00000ef0| 63 74 69 6f 6e 73 20 6c | 69 6b 65 20 73 69 6e 20 |ctions l|ike sin |
|00000f00| 61 6e 64 20 61 74 61 6e | 32 20 61 72 65 20 65 6e |and atan|2 are en|
|00000f10| 61 62 6c 65 64 20 66 6f | 72 20 65 78 70 72 65 73 |abled fo|r expres|
|00000f20| 73 69 6f 6e 73 0a 23 20 | 62 79 20 64 65 66 61 75 |sions.# |by defau|
|00000f30| 6c 74 2e 20 20 54 6f 20 | 64 69 73 61 62 6c 65 20 |lt. To |disable |
|00000f40| 74 68 65 6d 2c 20 72 65 | 76 65 72 73 65 20 74 68 |them, re|verse th|
|00000f50| 65 20 63 6f 6d 6d 65 6e | 74 20 63 68 61 72 61 63 |e commen|t charac|
|00000f60| 74 65 72 73 20 6f 6e 20 | 74 68 65 0a 23 20 66 6f |ters on |the.# fo|
|00000f70| 6c 6c 6f 77 69 6e 67 20 | 70 61 69 72 73 20 6f 66 |llowing |pairs of|
|00000f80| 20 6c 69 6e 65 73 3a 0a | 4d 41 54 48 5f 46 4c 41 | lines:.|MATH_FLA|
|00000f90| 47 53 20 3d 0a 23 4d 41 | 54 48 5f 46 4c 41 47 53 |GS =.#MA|TH_FLAGS|
|00000fa0| 20 3d 20 2d 44 54 43 4c | 5f 4e 4f 5f 4d 41 54 48 | = -DTCL|_NO_MATH|
|00000fb0| 0a 4d 41 54 48 5f 4c 49 | 42 53 20 3d 20 40 4d 41 |.MATH_LI|BS = @MA|
|00000fc0| 54 48 5f 4c 49 42 53 40 | 0a 23 4d 41 54 48 5f 4c |TH_LIBS@|.#MATH_L|
|00000fd0| 49 42 53 20 3d 0a 0a 23 | 20 54 6f 20 63 6f 6d 70 |IBS =..#| To comp|
|00000fe0| 69 6c 65 20 66 6f 72 20 | 6e 6f 6e 2d 55 4e 49 58 |ile for |non-UNIX|
|00000ff0| 20 73 79 73 74 65 6d 73 | 20 28 73 6f 20 74 68 61 | systems| (so tha|
|00001000| 74 20 6f 6e 6c 79 20 74 | 68 65 20 6e 6f 6e 2d 55 |t only t|he non-U|
|00001010| 4e 49 58 2d 73 70 65 63 | 69 66 69 63 0a 23 20 63 |NIX-spec|ific.# c|
|00001020| 6f 6d 6d 61 6e 64 73 20 | 61 72 65 20 61 76 61 69 |ommands |are avai|
|00001030| 6c 61 62 6c 65 29 2c 20 | 72 65 76 65 72 73 65 20 |lable), |reverse |
|00001040| 74 68 65 20 63 6f 6d 6d | 65 6e 74 20 63 68 61 72 |the comm|ent char|
|00001050| 61 63 74 65 72 73 20 6f | 6e 20 74 68 65 0a 23 20 |acters o|n the.# |
|00001060| 66 6f 6c 6c 6f 77 69 6e | 67 20 70 61 69 72 73 20 |followin|g pairs |
|00001070| 6f 66 20 6c 69 6e 65 73 | 2e 20 20 49 6e 20 61 64 |of lines|. In ad|
|00001080| 64 69 74 69 6f 6e 2c 20 | 79 6f 75 27 6c 6c 20 68 |dition, |you'll h|
|00001090| 61 76 65 20 74 6f 20 70 | 72 6f 76 69 64 65 20 79 |ave to p|rovide y|
|000010a0| 6f 75 72 0a 23 20 6f 77 | 6e 20 72 65 70 6c 61 63 |our.# ow|n replac|
|000010b0| 65 6d 65 6e 74 20 66 6f | 72 20 74 68 65 20 22 70 |ement fo|r the "p|
|000010c0| 61 6e 69 63 22 20 70 72 | 6f 63 65 64 75 72 65 20 |anic" pr|ocedure |
|000010d0| 28 73 65 65 20 70 61 6e | 69 63 2e 63 20 66 6f 72 |(see pan|ic.c for|
|000010e0| 20 77 68 61 74 0a 23 20 | 74 68 65 20 63 75 72 72 | what.# |the curr|
|000010f0| 65 6e 74 20 6f 6e 65 20 | 64 6f 65 73 29 2e 0a 47 |ent one |does)..G|
|00001100| 45 4e 45 52 49 43 5f 46 | 4c 41 47 53 20 3d 0a 23 |ENERIC_F|LAGS =.#|
|00001110| 47 45 4e 45 52 49 43 5f | 46 4c 41 47 53 20 3d 20 |GENERIC_|FLAGS = |
|00001120| 2d 44 54 43 4c 5f 47 45 | 4e 45 52 49 43 5f 4f 4e |-DTCL_GE|NERIC_ON|
|00001130| 4c 59 0a 55 4e 49 58 5f | 4f 42 4a 53 20 3d 20 70 |LY.UNIX_|OBJS = p|
|00001140| 61 6e 69 63 2e 6f 20 74 | 63 6c 45 6e 76 2e 6f 20 |anic.o t|clEnv.o |
|00001150| 74 63 6c 47 6c 6f 62 2e | 6f 20 74 63 6c 4d 61 69 |tclGlob.|o tclMai|
|00001160| 6e 2e 6f 20 74 63 6c 4d | 74 68 65 72 72 2e 6f 20 |n.o tclM|therr.o |
|00001170| 5c 0a 09 74 63 6c 55 6e | 69 78 41 5a 2e 6f 20 74 |\..tclUn|ixAZ.o t|
|00001180| 63 6c 55 6e 69 78 53 74 | 72 2e 6f 20 74 63 6c 55 |clUnixSt|r.o tclU|
|00001190| 6e 69 78 55 74 69 6c 2e | 6f 0a 23 55 4e 49 58 5f |nixUtil.|o.#UNIX_|
|000011a0| 4f 42 4a 53 20 3d 0a 0a | 23 20 54 6f 20 65 6e 61 |OBJS =..|# To ena|
|000011b0| 62 6c 65 20 6d 65 6d 6f | 72 79 20 64 65 62 75 67 |ble memo|ry debug|
|000011c0| 67 69 6e 67 20 72 65 76 | 65 72 73 65 20 74 68 65 |ging rev|erse the|
|000011d0| 20 63 6f 6d 6d 65 6e 74 | 20 63 68 61 72 61 63 74 | comment| charact|
|000011e0| 65 72 73 20 6f 6e 20 74 | 68 65 20 66 6f 6c 6c 6f |ers on t|he follo|
|000011f0| 77 69 6e 67 0a 23 20 6c | 69 6e 65 73 2e 20 20 57 |wing.# l|ines. W|
|00001200| 61 72 6e 69 6e 67 3a 20 | 20 69 66 20 79 6f 75 20 |arning: | if you |
|00001210| 65 6e 61 62 6c 65 20 6d | 65 6d 6f 72 79 20 64 65 |enable m|emory de|
|00001220| 62 75 67 67 69 6e 67 2c | 20 79 6f 75 20 6d 75 73 |bugging,| you mus|
|00001230| 74 20 64 6f 20 69 74 0a | 23 20 2a 65 76 65 72 79 |t do it.|# *every|
|00001240| 77 68 65 72 65 2a 2c 20 | 69 6e 63 6c 75 64 69 6e |where*, |includin|
|00001250| 67 20 61 6c 6c 20 74 68 | 65 20 63 6f 64 65 20 74 |g all th|e code t|
|00001260| 68 61 74 20 63 61 6c 6c | 73 20 54 63 6c 2c 20 61 |hat call|s Tcl, a|
|00001270| 6e 64 20 79 6f 75 20 6d | 75 73 74 20 75 73 65 0a |nd you m|ust use.|
|00001280| 23 20 63 6b 61 6c 6c 6f | 63 20 61 6e 64 20 63 6b |# ckallo|c and ck|
|00001290| 66 72 65 65 20 65 76 65 | 72 79 77 68 65 72 65 20 |free eve|rywhere |
|000012a0| 69 6e 73 74 65 61 64 20 | 6f 66 20 6d 61 6c 6c 6f |instead |of mallo|
|000012b0| 63 20 61 6e 64 20 66 72 | 65 65 2e 0a 4d 45 4d 5f |c and fr|ee..MEM_|
|000012c0| 44 45 42 55 47 5f 46 4c | 41 47 53 20 3d 0a 23 4d |DEBUG_FL|AGS =.#M|
|000012d0| 45 4d 5f 44 45 42 55 47 | 5f 46 4c 41 47 53 20 3d |EM_DEBUG|_FLAGS =|
|000012e0| 20 2d 44 54 43 4c 5f 4d | 45 4d 5f 44 45 42 55 47 | -DTCL_M|EM_DEBUG|
|000012f0| 0a 0a 23 20 53 6f 6d 65 | 20 76 65 72 73 69 6f 6e |..# Some| version|
|00001300| 73 20 6f 66 20 6d 61 6b | 65 2c 20 6c 69 6b 65 20 |s of mak|e, like |
|00001310| 53 47 49 27 73 2c 20 75 | 73 65 20 74 68 65 20 66 |SGI's, u|se the f|
|00001320| 6f 6c 6c 6f 77 69 6e 67 | 20 76 61 72 69 61 62 6c |ollowing| variabl|
|00001330| 65 20 74 6f 0a 23 20 64 | 65 74 65 72 6d 69 6e 65 |e to.# d|etermine|
|00001340| 20 77 68 69 63 68 20 73 | 68 65 6c 6c 20 74 6f 20 | which s|hell to |
|00001350| 75 73 65 20 66 6f 72 20 | 65 78 65 63 75 74 69 6e |use for |executin|
|00001360| 67 20 63 6f 6d 6d 61 6e | 64 73 3a 0a 53 48 45 4c |g comman|ds:.SHEL|
|00001370| 4c 20 3d 09 09 2f 62 69 | 6e 2f 73 68 0a 0a 23 20 |L =../bi|n/sh..# |
|00001380| 54 63 6c 20 75 73 65 64 | 20 74 6f 20 6c 65 74 20 |Tcl used| to let |
|00001390| 74 68 65 20 63 6f 6e 66 | 69 67 75 72 65 20 73 63 |the conf|igure sc|
|000013a0| 72 69 70 74 20 63 68 6f | 6f 73 65 20 77 68 69 63 |ript cho|ose whic|
|000013b0| 68 20 70 72 6f 67 72 61 | 6d 20 74 6f 20 75 73 65 |h progra|m to use|
|000013c0| 0a 23 20 66 6f 72 20 69 | 6e 73 74 61 6c 6c 69 6e |.# for i|nstallin|
|000013d0| 67 2c 20 62 75 74 20 74 | 68 65 72 65 20 61 72 65 |g, but t|here are|
|000013e0| 20 6a 75 73 74 20 74 6f | 6f 20 6d 61 6e 79 20 64 | just to|o many d|
|000013f0| 69 66 66 65 72 65 6e 74 | 20 76 65 72 73 69 6f 6e |ifferent| version|
|00001400| 73 20 6f 66 0a 23 20 22 | 69 6e 73 74 61 6c 6c 22 |s of.# "|install"|
|00001410| 20 61 72 6f 75 6e 64 3b | 20 20 62 65 74 74 65 72 | around;| better|
|00001420| 20 74 6f 20 75 73 65 20 | 74 68 65 20 69 6e 73 74 | to use |the inst|
|00001430| 61 6c 6c 2d 73 68 20 73 | 63 72 69 70 74 20 74 68 |all-sh s|cript th|
|00001440| 61 74 20 63 6f 6d 65 73 | 0a 23 20 77 69 74 68 20 |at comes|.# with |
|00001450| 74 68 65 20 64 69 73 74 | 72 69 62 75 74 69 6f 6e |the dist|ribution|
|00001460| 2c 20 77 68 69 63 68 20 | 69 73 20 73 6c 6f 77 65 |, which |is slowe|
|00001470| 72 20 62 75 74 20 67 75 | 61 72 61 6e 74 65 65 64 |r but gu|aranteed|
|00001480| 20 74 6f 20 77 6f 72 6b | 2e 0a 0a 49 4e 53 54 41 | to work|...INSTA|
|00001490| 4c 4c 20 3d 20 40 73 72 | 63 64 69 72 40 2f 69 6e |LL = @sr|cdir@/in|
|000014a0| 73 74 61 6c 6c 2d 73 68 | 20 2d 63 0a 0a 23 2d 2d |stall-sh| -c..#--|
|000014b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000014c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000014d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000014e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0a 23 |--------|------.#|
|000014f0| 20 54 68 65 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e | The inf|ormation|
|00001500| 20 62 65 6c 6f 77 20 69 | 73 20 6d 6f 64 69 66 69 | below i|s modifi|
|00001510| 65 64 20 62 79 20 74 68 | 65 20 63 6f 6e 66 69 67 |ed by th|e config|
|00001520| 75 72 65 20 73 63 72 69 | 70 74 20 77 68 65 6e 0a |ure scri|pt when.|
|00001530| 23 20 4d 61 6b 65 66 69 | 6c 65 20 69 73 20 67 65 |# Makefi|le is ge|
|00001540| 6e 65 72 61 74 65 64 20 | 66 72 6f 6d 20 4d 61 6b |nerated |from Mak|
|00001550| 65 66 69 6c 65 2e 69 6e | 2e 20 20 59 6f 75 20 73 |efile.in|. You s|
|00001560| 68 6f 75 6c 64 6e 27 74 | 20 6e 6f 72 6d 61 6c 6c |houldn't| normall|
|00001570| 79 0a 23 20 6d 6f 64 69 | 66 79 20 61 6e 79 20 6f |y.# modi|fy any o|
|00001580| 66 20 74 68 69 73 20 73 | 74 75 66 66 20 62 79 20 |f this s|tuff by |
|00001590| 68 61 6e 64 2e 0a 23 2d | 2d 2d 2d 2d 2d 2d 2d 2d |hand..#-|--------|
|000015a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000015b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000015c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000015d0| 2d 2d 2d 2d 2d 2d 2d 0a | 0a 43 4f 4d 50 41 54 5f |-------.|.COMPAT_|
|000015e0| 4f 42 4a 53 20 3d 09 09 | 40 4c 49 42 4f 42 4a 53 |OBJS =..|@LIBOBJS|
|000015f0| 40 0a 41 43 5f 46 4c 41 | 47 53 20 3d 09 09 40 44 |@.AC_FLA|GS =..@D|
|00001600| 45 46 53 40 0a 49 4e 53 | 54 41 4c 4c 5f 50 52 4f |EFS@.INS|TALL_PRO|
|00001610| 47 52 41 4d 20 3d 09 40 | 49 4e 53 54 41 4c 4c 5f |GRAM =.@|INSTALL_|
|00001620| 50 52 4f 47 52 41 4d 40 | 0a 49 4e 53 54 41 4c 4c |PROGRAM@|.INSTALL|
|00001630| 5f 44 41 54 41 20 3d 09 | 09 40 49 4e 53 54 41 4c |_DATA =.|.@INSTAL|
|00001640| 4c 5f 44 41 54 41 40 0a | 52 41 4e 4c 49 42 20 3d |L_DATA@.|RANLIB =|
|00001650| 09 09 40 52 41 4e 4c 49 | 42 40 0a 53 52 43 5f 44 |..@RANLI|B@.SRC_D|
|00001660| 49 52 20 3d 09 09 40 73 | 72 63 64 69 72 40 0a 56 |IR =..@s|rcdir@.V|
|00001670| 50 41 54 48 20 3d 09 09 | 09 40 73 72 63 64 69 72 |PATH =..|.@srcdir|
|00001680| 40 0a 0a 23 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |@..#----|--------|
|00001690| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000016a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000016b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000016c0| 2d 2d 2d 2d 0a 23 20 54 | 68 65 20 69 6e 66 6f 72 |----.# T|he infor|
|000016d0| 6d 61 74 69 6f 6e 20 62 | 65 6c 6f 77 20 73 68 6f |mation b|elow sho|
|000016e0| 75 6c 64 20 62 65 20 75 | 73 61 62 6c 65 20 61 73 |uld be u|sable as|
|000016f0| 20 69 73 2e 20 20 54 68 | 65 20 63 6f 6e 66 69 67 | is. Th|e config|
|00001700| 75 72 65 0a 23 20 73 63 | 72 69 70 74 20 77 6f 6e |ure.# sc|ript won|
|00001710| 27 74 20 6d 6f 64 69 66 | 79 20 69 74 20 61 6e 64 |'t modif|y it and|
|00001720| 20 79 6f 75 20 73 68 6f | 75 6c 64 6e 27 74 20 6e | you sho|uldn't n|
|00001730| 65 65 64 20 74 6f 20 6d | 6f 64 69 66 79 20 69 74 |eed to m|odify it|
|00001740| 0a 23 20 65 69 74 68 65 | 72 2e 0a 23 2d 2d 2d 2d |.# eithe|r..#----|
|00001750| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001760| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001770| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001780| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0a 0a 0a 43 |--------|----...C|
|00001790| 43 20 3d 09 09 40 43 43 | 40 0a 43 43 5f 53 57 49 |C =..@CC|@.CC_SWI|
|000017a0| 54 43 48 45 53 20 3d 09 | 24 7b 43 46 4c 41 47 53 |TCHES =.|${CFLAGS|
|000017b0| 7d 20 2d 49 2e 20 2d 49 | 24 7b 53 52 43 5f 44 49 |} -I. -I|${SRC_DI|
|000017c0| 52 7d 20 24 7b 41 43 5f | 46 4c 41 47 53 7d 20 24 |R} ${AC_|FLAGS} $|
|000017d0| 7b 4d 41 54 48 5f 46 4c | 41 47 53 7d 20 5c 0a 24 |{MATH_FL|AGS} \.$|
|000017e0| 7b 47 45 4e 45 52 49 43 | 5f 46 4c 41 47 53 7d 20 |{GENERIC|_FLAGS} |
|000017f0| 24 7b 50 52 4f 54 4f 5f | 46 4c 41 47 53 7d 20 24 |${PROTO_|FLAGS} $|
|00001800| 7b 4d 45 4d 5f 44 45 42 | 55 47 5f 46 4c 41 47 53 |{MEM_DEB|UG_FLAGS|
|00001810| 7d 20 5c 0a 2d 44 54 43 | 4c 5f 4c 49 42 52 41 52 |} \.-DTC|L_LIBRAR|
|00001820| 59 3d 5c 22 24 7b 54 43 | 4c 5f 4c 49 42 52 41 52 |Y=\"${TC|L_LIBRAR|
|00001830| 59 7d 5c 22 0a 0a 47 45 | 4e 45 52 49 43 5f 4f 42 |Y}\"..GE|NERIC_OB|
|00001840| 4a 53 20 3d 09 72 65 67 | 65 78 70 2e 6f 20 74 63 |JS =.reg|exp.o tc|
|00001850| 6c 41 73 79 6e 63 2e 6f | 20 74 63 6c 42 61 73 69 |lAsync.o| tclBasi|
|00001860| 63 2e 6f 20 74 63 6c 43 | 6b 61 6c 6c 6f 63 2e 6f |c.o tclC|kalloc.o|
|00001870| 20 5c 0a 09 74 63 6c 43 | 6d 64 41 48 2e 6f 20 74 | \..tclC|mdAH.o t|
|00001880| 63 6c 43 6d 64 49 4c 2e | 6f 20 74 63 6c 43 6d 64 |clCmdIL.|o tclCmd|
|00001890| 4d 5a 2e 6f 20 74 63 6c | 45 78 70 72 2e 6f 20 74 |MZ.o tcl|Expr.o t|
|000018a0| 63 6c 47 65 74 2e 6f 20 | 5c 0a 09 74 63 6c 48 61 |clGet.o |\..tclHa|
|000018b0| 73 68 2e 6f 20 74 63 6c | 48 69 73 74 6f 72 79 2e |sh.o tcl|History.|
|000018c0| 6f 20 74 63 6c 4c 69 6e | 6b 2e 6f 20 74 63 6c 50 |o tclLin|k.o tclP|
|000018d0| 61 72 73 65 2e 6f 20 74 | 63 6c 50 72 6f 63 2e 6f |arse.o t|clProc.o|
|000018e0| 20 5c 0a 09 74 63 6c 55 | 74 69 6c 2e 6f 20 74 63 | \..tclU|til.o tc|
|000018f0| 6c 56 61 72 2e 6f 0a 0a | 4f 42 4a 53 20 3d 20 24 |lVar.o..|OBJS = $|
|00001900| 7b 47 45 4e 45 52 49 43 | 5f 4f 42 4a 53 7d 20 24 |{GENERIC|_OBJS} $|
|00001910| 7b 55 4e 49 58 5f 4f 42 | 4a 53 7d 20 24 7b 43 4f |{UNIX_OB|JS} ${CO|
|00001920| 4d 50 41 54 5f 4f 42 4a | 53 7d 0a 0a 53 52 43 53 |MPAT_OBJ|S}..SRCS|
|00001930| 3d 20 72 65 67 65 78 70 | 2e 63 20 74 63 6c 41 73 |= regexp|.c tclAs|
|00001940| 79 6e 63 2e 63 20 74 63 | 6c 42 61 73 69 63 2e 63 |ync.c tc|lBasic.c|
|00001950| 20 74 63 6c 43 6b 61 6c | 6c 6f 63 2e 63 20 5c 0a | tclCkal|loc.c \.|
|00001960| 09 74 63 6c 43 6d 64 41 | 48 2e 63 20 74 63 6c 43 |.tclCmdA|H.c tclC|
|00001970| 6d 64 49 4c 2e 63 20 74 | 63 6c 43 6d 64 4d 5a 2e |mdIL.c t|clCmdMZ.|
|00001980| 63 20 74 63 6c 45 78 70 | 72 2e 63 20 74 63 6c 47 |c tclExp|r.c tclG|
|00001990| 65 74 2e 63 20 5c 0a 09 | 74 63 6c 48 61 73 68 2e |et.c \..|tclHash.|
|000019a0| 63 20 74 63 6c 48 69 73 | 74 6f 72 79 2e 63 20 74 |c tclHis|tory.c t|
|000019b0| 63 6c 4c 69 6e 6b 2e 63 | 20 74 63 6c 50 61 72 73 |clLink.c| tclPars|
|000019c0| 65 2e 63 20 74 63 6c 50 | 72 6f 63 2e 63 20 5c 0a |e.c tclP|roc.c \.|
|000019d0| 09 74 63 6c 55 74 69 6c | 2e 63 20 74 63 6c 56 61 |.tclUtil|.c tclVa|
|000019e0| 72 2e 63 20 70 61 6e 69 | 63 2e 63 20 74 63 6c 45 |r.c pani|c.c tclE|
|000019f0| 6e 76 2e 63 20 74 63 6c | 47 6c 6f 62 2e 63 20 74 |nv.c tcl|Glob.c t|
|00001a00| 63 6c 4d 61 69 6e 2e 63 | 20 5c 0a 09 74 63 6c 4d |clMain.c| \..tclM|
|00001a10| 74 68 65 72 72 2e 63 20 | 74 63 6c 55 6e 69 78 41 |therr.c |tclUnixA|
|00001a20| 5a 2e 63 20 74 63 6c 55 | 6e 69 78 53 74 72 2e 63 |Z.c tclU|nixStr.c|
|00001a30| 20 74 63 6c 55 6e 69 78 | 55 74 69 6c 2e 63 20 5c | tclUnix|Util.c \|
|00001a40| 0a 09 74 63 6c 54 65 73 | 74 2e 63 20 74 63 6c 41 |..tclTes|t.c tclA|
|00001a50| 70 70 49 6e 69 74 2e 63 | 0a 0a 61 6c 6c 3a 20 6c |ppInit.c|..all: l|
|00001a60| 69 62 74 63 6c 2e 61 20 | 74 63 6c 73 68 0a 0a 6c |ibtcl.a |tclsh..l|
|00001a70| 69 62 74 63 6c 2e 61 3a | 20 24 7b 4f 42 4a 53 7d |ibtcl.a:| ${OBJS}|
|00001a80| 0a 09 72 6d 20 2d 66 20 | 6c 69 62 74 63 6c 2e 61 |..rm -f |libtcl.a|
|00001a90| 0a 09 61 72 20 63 72 20 | 6c 69 62 74 63 6c 2e 61 |..ar cr |libtcl.a|
|00001aa0| 20 24 7b 4f 42 4a 53 7d | 0a 09 24 28 52 41 4e 4c | ${OBJS}|..$(RANL|
|00001ab0| 49 42 29 20 6c 69 62 74 | 63 6c 2e 61 0a 0a 74 63 |IB) libt|cl.a..tc|
|00001ac0| 6c 73 68 3a 20 74 63 6c | 41 70 70 49 6e 69 74 2e |lsh: tcl|AppInit.|
|00001ad0| 6f 20 6c 69 62 74 63 6c | 2e 61 0a 09 24 7b 43 43 |o libtcl|.a..${CC|
|00001ae0| 7d 20 24 7b 43 43 5f 53 | 57 49 54 43 48 45 53 7d |} ${CC_S|WITCHES}|
|00001af0| 20 74 63 6c 41 70 70 49 | 6e 69 74 2e 6f 20 6c 69 | tclAppI|nit.o li|
|00001b00| 62 74 63 6c 2e 61 20 24 | 7b 4d 41 54 48 5f 4c 49 |btcl.a $|{MATH_LI|
|00001b10| 42 53 7d 20 2d 6f 20 74 | 63 6c 73 68 0a 0a 74 63 |BS} -o t|clsh..tc|
|00001b20| 6c 74 65 73 74 3a 20 74 | 63 6c 54 65 73 74 2e 6f |ltest: t|clTest.o|
|00001b30| 20 6c 69 62 74 63 6c 2e | 61 0a 09 24 7b 43 43 7d | libtcl.|a..${CC}|
|00001b40| 20 24 7b 43 43 5f 53 57 | 49 54 43 48 45 53 7d 20 | ${CC_SW|ITCHES} |
|00001b50| 74 63 6c 54 65 73 74 2e | 6f 20 6c 69 62 74 63 6c |tclTest.|o libtcl|
|00001b60| 2e 61 20 24 7b 4d 41 54 | 48 5f 4c 49 42 53 7d 20 |.a ${MAT|H_LIBS} |
|00001b70| 2d 6f 20 74 63 6c 74 65 | 73 74 0a 0a 74 65 73 74 |-o tclte|st..test|
|00001b80| 3a 20 74 63 6c 74 65 73 | 74 0a 09 40 63 77 64 3d |: tcltes|t..@cwd=|
|00001b90| 60 70 77 64 60 3b 20 5c | 0a 09 63 64 20 24 28 53 |`pwd`; \|..cd $(S|
|00001ba0| 52 43 5f 44 49 52 29 3b | 20 54 43 4c 5f 4c 49 42 |RC_DIR);| TCL_LIB|
|00001bb0| 52 41 52 59 3d 60 70 77 | 64 60 2f 6c 69 62 72 61 |RARY=`pw|d`/libra|
|00001bc0| 72 79 3b 20 65 78 70 6f | 72 74 20 54 43 4c 5f 4c |ry; expo|rt TCL_L|
|00001bd0| 49 42 52 41 52 59 3b 20 | 5c 0a 09 63 64 20 24 24 |IBRARY; |\..cd $$|
|00001be0| 63 77 64 3b 20 28 20 65 | 63 68 6f 20 63 64 20 24 |cwd; ( e|cho cd $|
|00001bf0| 28 53 52 43 5f 44 49 52 | 29 2f 74 65 73 74 73 5c |(SRC_DIR|)/tests\|
|00001c00| 3b 20 73 6f 75 72 63 65 | 20 61 6c 6c 20 29 20 7c |; source| all ) ||
|00001c10| 20 2e 2f 74 63 6c 74 65 | 73 74 0a 0a 63 6f 6e 66 | ./tclte|st..conf|
|00001c20| 69 67 49 6e 66 6f 3a 20 | 4d 61 6b 65 66 69 6c 65 |igInfo: |Makefile|
|00001c30| 0a 09 40 72 6d 20 2d 66 | 20 63 6f 6e 66 69 67 49 |..@rm -f| configI|
|00001c40| 6e 66 6f 0a 09 40 65 63 | 68 6f 20 22 23 20 44 65 |nfo..@ec|ho "# De|
|00001c50| 66 69 6e 69 74 69 6f 6e | 73 20 61 6e 64 20 6c 69 |finition|s and li|
|00001c60| 62 72 61 72 69 65 73 20 | 6e 65 65 64 65 64 20 74 |braries |needed t|
|00001c70| 6f 20 62 75 69 6c 64 20 | 54 63 6c 20 61 70 70 6c |o build |Tcl appl|
|00001c80| 69 63 61 74 69 6f 6e 73 | 22 20 3e 3e 20 63 6f 6e |ications|" >> con|
|00001c90| 66 69 67 49 6e 66 6f 0a | 09 40 65 63 68 6f 20 22 |figInfo.|.@echo "|
|00001ca0| 23 20 28 67 65 6e 65 72 | 61 74 65 64 20 62 79 20 |# (gener|ated by |
|00001cb0| 74 68 65 20 63 6f 6e 66 | 69 67 75 72 65 20 73 63 |the conf|igure sc|
|00001cc0| 72 69 70 74 29 3a 22 20 | 3e 3e 20 63 6f 6e 66 69 |ript):" |>> confi|
|00001cd0| 67 49 6e 66 6f 0a 09 40 | 65 63 68 6f 20 22 54 43 |gInfo..@|echo "TC|
|00001ce0| 4c 5f 43 43 5f 53 57 49 | 54 43 48 45 53 20 3d 20 |L_CC_SWI|TCHES = |
|00001cf0| 24 7b 41 43 5f 46 4c 41 | 47 53 7d 20 24 7b 4d 45 |${AC_FLA|GS} ${ME|
|00001d00| 4d 5f 44 45 42 55 47 5f | 46 4c 41 47 53 7d 22 20 |M_DEBUG_|FLAGS}" |
|00001d10| 3e 3e 20 63 6f 6e 66 69 | 67 49 6e 66 6f 0a 09 40 |>> confi|gInfo..@|
|00001d20| 65 63 68 6f 20 22 54 43 | 4c 5f 4c 49 42 53 20 3d |echo "TC|L_LIBS =|
|00001d30| 20 24 7b 4d 41 54 48 5f | 4c 49 42 53 7d 20 40 4c | ${MATH_|LIBS} @L|
|00001d40| 49 42 53 40 22 20 3e 3e | 20 63 6f 6e 66 69 67 49 |IBS@" >>| configI|
|00001d50| 6e 66 6f 0a 0a 69 6e 73 | 74 61 6c 6c 3a 20 69 6e |nfo..ins|tall: in|
|00001d60| 73 74 61 6c 6c 2d 62 69 | 6e 61 72 69 65 73 20 69 |stall-bi|naries i|
|00001d70| 6e 73 74 61 6c 6c 2d 6c | 69 62 72 61 72 69 65 73 |nstall-l|ibraries|
|00001d80| 20 69 6e 73 74 61 6c 6c | 2d 6d 61 6e 0a 0a 69 6e | install|-man..in|
|00001d90| 73 74 61 6c 6c 2d 62 69 | 6e 61 72 69 65 73 3a 20 |stall-bi|naries: |
|00001da0| 6c 69 62 74 63 6c 2e 61 | 20 74 63 6c 73 68 0a 09 |libtcl.a| tclsh..|
|00001db0| 40 66 6f 72 20 69 20 69 | 6e 20 24 28 4c 49 42 5f |@for i i|n $(LIB_|
|00001dc0| 49 4e 53 54 41 4c 4c 5f | 44 49 52 29 20 24 28 42 |INSTALL_|DIR) $(B|
|00001dd0| 49 4e 5f 49 4e 53 54 41 | 4c 4c 5f 44 49 52 29 20 |IN_INSTA|LL_DIR) |
|00001de0| 3b 20 5c 0a 09 20 20 20 | 20 64 6f 20 5c 0a 09 20 |; \.. | do \.. |
|00001df0| 20 20 20 69 66 20 5b 20 | 21 20 2d 64 20 24 24 69 | if [ |! -d $$i|
|00001e00| 20 5d 20 3b 20 74 68 65 | 6e 20 5c 0a 09 09 65 63 | ] ; the|n \...ec|
|00001e10| 68 6f 20 22 4d 61 6b 69 | 6e 67 20 64 69 72 65 63 |ho "Maki|ng direc|
|00001e20| 74 6f 72 79 20 24 24 69 | 22 3b 20 5c 0a 09 09 6d |tory $$i|"; \...m|
|00001e30| 6b 64 69 72 20 24 24 69 | 3b 20 5c 0a 09 09 63 68 |kdir $$i|; \...ch|
|00001e40| 6d 6f 64 20 37 35 35 20 | 24 24 69 3b 20 5c 0a 09 |mod 755 |$$i; \..|
|00001e50| 09 65 6c 73 65 20 74 72 | 75 65 3b 20 5c 0a 09 09 |.else tr|ue; \...|
|00001e60| 66 69 3b 20 5c 0a 09 20 | 20 20 20 64 6f 6e 65 3b |fi; \.. | done;|
|00001e70| 0a 09 40 65 63 68 6f 20 | 22 49 6e 73 74 61 6c 6c |..@echo |"Install|
|00001e80| 69 6e 67 20 6c 69 62 74 | 63 6c 2e 61 22 0a 09 40 |ing libt|cl.a"..@|
|00001e90| 24 28 49 4e 53 54 41 4c | 4c 5f 44 41 54 41 29 20 |$(INSTAL|L_DATA) |
|00001ea0| 6c 69 62 74 63 6c 2e 61 | 20 24 28 4c 49 42 5f 49 |libtcl.a| $(LIB_I|
|00001eb0| 4e 53 54 41 4c 4c 5f 44 | 49 52 29 2f 6c 69 62 74 |NSTALL_D|IR)/libt|
|00001ec0| 63 6c 24 28 56 45 52 53 | 49 4f 4e 29 2e 61 0a 09 |cl$(VERS|ION).a..|
|00001ed0| 40 24 28 52 41 4e 4c 49 | 42 29 20 24 28 4c 49 42 |@$(RANLI|B) $(LIB|
|00001ee0| 5f 49 4e 53 54 41 4c 4c | 5f 44 49 52 29 2f 6c 69 |_INSTALL|_DIR)/li|
|00001ef0| 62 74 63 6c 24 28 56 45 | 52 53 49 4f 4e 29 2e 61 |btcl$(VE|RSION).a|
|00001f00| 0a 09 40 65 63 68 6f 20 | 22 49 6e 73 74 61 6c 6c |..@echo |"Install|
|00001f10| 69 6e 67 20 74 63 6c 73 | 68 22 0a 09 40 24 28 49 |ing tcls|h"..@$(I|
|00001f20| 4e 53 54 41 4c 4c 5f 50 | 52 4f 47 52 41 4d 29 20 |NSTALL_P|ROGRAM) |
|00001f30| 74 63 6c 73 68 20 24 28 | 42 49 4e 5f 49 4e 53 54 |tclsh $(|BIN_INST|
|00001f40| 41 4c 4c 5f 44 49 52 29 | 2f 74 63 6c 73 68 24 28 |ALL_DIR)|/tclsh$(|
|00001f50| 56 45 52 53 49 4f 4e 29 | 0a 0a 69 6e 73 74 61 6c |VERSION)|..instal|
|00001f60| 6c 2d 6c 69 62 72 61 72 | 69 65 73 3a 0a 09 40 66 |l-librar|ies:..@f|
|00001f70| 6f 72 20 69 20 69 6e 20 | 24 28 49 4e 53 54 41 4c |or i in |$(INSTAL|
|00001f80| 4c 5f 52 4f 4f 54 29 24 | 28 70 72 65 66 69 78 29 |L_ROOT)$|(prefix)|
|00001f90| 2f 6c 69 62 20 24 28 49 | 4e 43 4c 55 44 45 5f 49 |/lib $(I|NCLUDE_I|
|00001fa0| 4e 53 54 41 4c 4c 5f 44 | 49 52 29 20 5c 0a 09 09 |NSTALL_D|IR) \...|
|00001fb0| 24 28 53 43 52 49 50 54 | 5f 49 4e 53 54 41 4c 4c |$(SCRIPT|_INSTALL|
|00001fc0| 5f 44 49 52 29 20 3b 20 | 5c 0a 09 20 20 20 20 64 |_DIR) ; |\.. d|
|00001fd0| 6f 20 5c 0a 09 20 20 20 | 20 69 66 20 5b 20 21 20 |o \.. | if [ ! |
|00001fe0| 2d 64 20 24 24 69 20 5d | 20 3b 20 74 68 65 6e 20 |-d $$i ]| ; then |
|00001ff0| 5c 0a 09 09 65 63 68 6f | 20 22 4d 61 6b 69 6e 67 |\...echo| "Making|
|00002000| 20 64 69 72 65 63 74 6f | 72 79 20 24 24 69 22 3b | directo|ry $$i";|
|00002010| 20 5c 0a 09 09 6d 6b 64 | 69 72 20 24 24 69 3b 20 | \...mkd|ir $$i; |
|00002020| 5c 0a 09 09 63 68 6d 6f | 64 20 37 35 35 20 24 24 |\...chmo|d 755 $$|
|00002030| 69 3b 20 5c 0a 09 09 65 | 6c 73 65 20 74 72 75 65 |i; \...e|lse true|
|00002040| 3b 20 5c 0a 09 09 66 69 | 3b 20 5c 0a 09 20 20 20 |; \...fi|; \.. |
|00002050| 20 64 6f 6e 65 3b 0a 09 | 40 65 63 68 6f 20 22 49 | done;..|@echo "I|
|00002060| 6e 73 74 61 6c 6c 69 6e | 67 20 74 63 6c 2e 68 22 |nstallin|g tcl.h"|
|00002070| 0a 09 40 24 28 49 4e 53 | 54 41 4c 4c 5f 44 41 54 |..@$(INS|TALL_DAT|
|00002080| 41 29 20 24 28 53 52 43 | 5f 44 49 52 29 2f 74 63 |A) $(SRC|_DIR)/tc|
|00002090| 6c 2e 68 20 24 28 49 4e | 43 4c 55 44 45 5f 49 4e |l.h $(IN|CLUDE_IN|
|000020a0| 53 54 41 4c 4c 5f 44 49 | 52 29 0a 09 40 66 6f 72 |STALL_DI|R)..@for|
|000020b0| 20 69 20 69 6e 20 24 28 | 53 52 43 5f 44 49 52 29 | i in $(|SRC_DIR)|
|000020c0| 2f 6c 69 62 72 61 72 79 | 2f 2a 2e 74 63 6c 20 24 |/library|/*.tcl $|
|000020d0| 28 53 52 43 5f 44 49 52 | 29 2f 6c 69 62 72 61 72 |(SRC_DIR|)/librar|
|000020e0| 79 2f 74 63 6c 49 6e 64 | 65 78 20 24 28 53 52 43 |y/tclInd|ex $(SRC|
|000020f0| 5f 44 49 52 29 2f 74 63 | 6c 41 70 70 49 6e 69 74 |_DIR)/tc|lAppInit|
|00002100| 2e 63 3b 20 5c 0a 09 20 | 20 20 20 64 6f 20 5c 0a |.c; \.. | do \.|
|00002110| 09 20 20 20 20 65 63 68 | 6f 20 22 49 6e 73 74 61 |. ech|o "Insta|
|00002120| 6c 6c 69 6e 67 20 24 24 | 69 22 3b 20 5c 0a 09 20 |lling $$|i"; \.. |
|00002130| 20 20 20 24 28 49 4e 53 | 54 41 4c 4c 5f 44 41 54 | $(INS|TALL_DAT|
|00002140| 41 29 20 24 24 69 20 24 | 28 53 43 52 49 50 54 5f |A) $$i $|(SCRIPT_|
|00002150| 49 4e 53 54 41 4c 4c 5f | 44 49 52 29 3b 20 5c 0a |INSTALL_|DIR); \.|
|00002160| 09 20 20 20 20 64 6f 6e | 65 3b 0a 0a 69 6e 73 74 |. don|e;..inst|
|00002170| 61 6c 6c 2d 6d 61 6e 3a | 0a 09 40 66 6f 72 20 69 |all-man:|..@for i|
|00002180| 20 69 6e 20 24 28 4d 41 | 4e 5f 49 4e 53 54 41 4c | in $(MA|N_INSTAL|
|00002190| 4c 5f 44 49 52 29 20 24 | 28 4d 41 4e 31 5f 49 4e |L_DIR) $|(MAN1_IN|
|000021a0| 53 54 41 4c 4c 5f 44 49 | 52 29 20 24 28 4d 41 4e |STALL_DI|R) $(MAN|
|000021b0| 33 5f 49 4e 53 54 41 4c | 4c 5f 44 49 52 29 20 24 |3_INSTAL|L_DIR) $|
|000021c0| 28 4d 41 4e 4e 5f 49 4e | 53 54 41 4c 4c 5f 44 49 |(MANN_IN|STALL_DI|
|000021d0| 52 29 20 3b 20 5c 0a 09 | 20 20 20 20 64 6f 20 5c |R) ; \..| do \|
|000021e0| 0a 09 20 20 20 20 69 66 | 20 5b 20 21 20 2d 64 20 |.. if| [ ! -d |
|000021f0| 24 24 69 20 5d 20 3b 20 | 74 68 65 6e 20 5c 0a 09 |$$i ] ; |then \..|
|00002200| 09 65 63 68 6f 20 22 4d | 61 6b 69 6e 67 20 64 69 |.echo "M|aking di|
|00002210| 72 65 63 74 6f 72 79 20 | 24 24 69 22 3b 20 5c 0a |rectory |$$i"; \.|
|00002220| 09 09 6d 6b 64 69 72 20 | 24 24 69 3b 20 5c 0a 09 |..mkdir |$$i; \..|
|00002230| 09 63 68 6d 6f 64 20 37 | 35 35 20 24 24 69 3b 20 |.chmod 7|55 $$i; |
|00002240| 5c 0a 09 09 65 6c 73 65 | 20 74 72 75 65 3b 20 5c |\...else| true; \|
|00002250| 0a 09 09 66 69 3b 20 5c | 0a 09 20 20 20 20 64 6f |...fi; \|.. do|
|00002260| 6e 65 3b 0a 09 40 63 64 | 20 24 28 53 52 43 5f 44 |ne;..@cd| $(SRC_D|
|00002270| 49 52 29 2f 64 6f 63 3b | 20 66 6f 72 20 69 20 69 |IR)/doc;| for i i|
|00002280| 6e 20 2a 2e 31 3b 20 5c | 0a 09 20 20 20 20 64 6f |n *.1; \|.. do|
|00002290| 20 5c 0a 09 20 20 20 20 | 65 63 68 6f 20 22 49 6e | \.. |echo "In|
|000022a0| 73 74 61 6c 6c 69 6e 67 | 20 64 6f 63 2f 24 24 69 |stalling| doc/$$i|
|000022b0| 22 3b 20 5c 0a 09 20 20 | 20 20 72 6d 20 2d 66 20 |"; \.. | rm -f |
|000022c0| 24 28 4d 41 4e 31 5f 49 | 4e 53 54 41 4c 4c 5f 44 |$(MAN1_I|NSTALL_D|
|000022d0| 49 52 29 2f 24 24 69 3b | 20 5c 0a 09 20 20 20 20 |IR)/$$i;| \.. |
|000022e0| 73 65 64 20 2d 65 20 27 | 2f 6d 61 6e 5c 2e 6d 61 |sed -e '|/man\.ma|
|000022f0| 63 72 6f 73 2f 72 20 6d | 61 6e 2e 6d 61 63 72 6f |cros/r m|an.macro|
|00002300| 73 27 20 2d 65 20 27 2f | 6d 61 6e 5c 2e 6d 61 63 |s' -e '/|man\.mac|
|00002310| 72 6f 73 2f 64 27 20 5c | 0a 09 09 20 20 20 20 24 |ros/d' \|... $|
|00002320| 24 69 20 3e 20 24 28 4d | 41 4e 31 5f 49 4e 53 54 |$i > $(M|AN1_INST|
|00002330| 41 4c 4c 5f 44 49 52 29 | 2f 24 24 69 3b 20 5c 0a |ALL_DIR)|/$$i; \.|
|00002340| 09 20 20 20 20 63 68 6d | 6f 64 20 34 34 34 20 24 |. chm|od 444 $|
|00002350| 28 4d 41 4e 31 5f 49 4e | 53 54 41 4c 4c 5f 44 49 |(MAN1_IN|STALL_DI|
|00002360| 52 29 2f 24 24 69 3b 20 | 5c 0a 09 20 20 20 20 64 |R)/$$i; |\.. d|
|00002370| 6f 6e 65 3b 0a 09 40 63 | 64 20 24 28 53 52 43 5f |one;..@c|d $(SRC_|
|00002380| 44 49 52 29 2f 64 6f 63 | 3b 20 66 6f 72 20 69 20 |DIR)/doc|; for i |
|00002390| 69 6e 20 2a 2e 33 3b 20 | 5c 0a 09 20 20 20 20 64 |in *.3; |\.. d|
|000023a0| 6f 20 5c 0a 09 20 20 20 | 20 65 63 68 6f 20 22 49 |o \.. | echo "I|
|000023b0| 6e 73 74 61 6c 6c 69 6e | 67 20 64 6f 63 2f 24 24 |nstallin|g doc/$$|
|000023c0| 69 22 3b 20 5c 0a 09 20 | 20 20 20 72 6d 20 2d 66 |i"; \.. | rm -f|
|000023d0| 20 24 28 4d 41 4e 33 5f | 49 4e 53 54 41 4c 4c 5f | $(MAN3_|INSTALL_|
|000023e0| 44 49 52 29 2f 24 24 69 | 3b 20 5c 0a 09 20 20 20 |DIR)/$$i|; \.. |
|000023f0| 20 73 65 64 20 2d 65 20 | 27 2f 6d 61 6e 5c 2e 6d | sed -e |'/man\.m|
|00002400| 61 63 72 6f 73 2f 72 20 | 6d 61 6e 2e 6d 61 63 72 |acros/r |man.macr|
|00002410| 6f 73 27 20 2d 65 20 27 | 2f 6d 61 6e 5c 2e 6d 61 |os' -e '|/man\.ma|
|00002420| 63 72 6f 73 2f 64 27 20 | 5c 0a 09 09 20 20 20 20 |cros/d' |\... |
|00002430| 24 24 69 20 3e 20 24 28 | 4d 41 4e 33 5f 49 4e 53 |$$i > $(|MAN3_INS|
|00002440| 54 41 4c 4c 5f 44 49 52 | 29 2f 24 24 69 3b 20 5c |TALL_DIR|)/$$i; \|
|00002450| 0a 09 20 20 20 20 63 68 | 6d 6f 64 20 34 34 34 20 |.. ch|mod 444 |
|00002460| 24 28 4d 41 4e 33 5f 49 | 4e 53 54 41 4c 4c 5f 44 |$(MAN3_I|NSTALL_D|
|00002470| 49 52 29 2f 24 24 69 3b | 20 5c 0a 09 20 20 20 20 |IR)/$$i;| \.. |
|00002480| 64 6f 6e 65 3b 0a 09 40 | 63 64 20 24 28 53 52 43 |done;..@|cd $(SRC|
|00002490| 5f 44 49 52 29 2f 64 6f | 63 3b 20 66 6f 72 20 69 |_DIR)/do|c; for i|
|000024a0| 20 69 6e 20 2a 2e 6e 3b | 20 5c 0a 09 20 20 20 20 | in *.n;| \.. |
|000024b0| 64 6f 20 5c 0a 09 20 20 | 20 20 65 63 68 6f 20 22 |do \.. | echo "|
|000024c0| 49 6e 73 74 61 6c 6c 69 | 6e 67 20 64 6f 63 2f 24 |Installi|ng doc/$|
|000024d0| 24 69 22 3b 20 5c 0a 09 | 20 20 20 20 72 6d 20 2d |$i"; \..| rm -|
|000024e0| 66 20 24 28 4d 41 4e 4e | 5f 49 4e 53 54 41 4c 4c |f $(MANN|_INSTALL|
|000024f0| 5f 44 49 52 29 2f 24 24 | 69 3b 20 5c 0a 09 20 20 |_DIR)/$$|i; \.. |
|00002500| 20 20 73 65 64 20 2d 65 | 20 27 2f 6d 61 6e 5c 2e | sed -e| '/man\.|
|00002510| 6d 61 63 72 6f 73 2f 72 | 20 6d 61 6e 2e 6d 61 63 |macros/r| man.mac|
|00002520| 72 6f 73 27 20 2d 65 20 | 27 2f 6d 61 6e 5c 2e 6d |ros' -e |'/man\.m|
|00002530| 61 63 72 6f 73 2f 64 27 | 20 5c 0a 09 09 20 20 20 |acros/d'| \... |
|00002540| 20 24 24 69 20 3e 20 24 | 28 4d 41 4e 4e 5f 49 4e | $$i > $|(MANN_IN|
|00002550| 53 54 41 4c 4c 5f 44 49 | 52 29 2f 24 24 69 3b 20 |STALL_DI|R)/$$i; |
|00002560| 5c 0a 09 20 20 20 20 63 | 68 6d 6f 64 20 34 34 34 |\.. c|hmod 444|
|00002570| 20 24 28 4d 41 4e 4e 5f | 49 4e 53 54 41 4c 4c 5f | $(MANN_|INSTALL_|
|00002580| 44 49 52 29 2f 24 24 69 | 3b 20 5c 0a 09 20 20 20 |DIR)/$$i|; \.. |
|00002590| 20 64 6f 6e 65 3b 0a 0a | 4d 61 6b 65 66 69 6c 65 | done;..|Makefile|
|000025a0| 3a 20 24 28 53 52 43 5f | 44 49 52 29 2f 4d 61 6b |: $(SRC_|DIR)/Mak|
|000025b0| 65 66 69 6c 65 2e 69 6e | 0a 09 24 28 53 48 45 4c |efile.in|..$(SHEL|
|000025c0| 4c 29 20 63 6f 6e 66 69 | 67 2e 73 74 61 74 75 73 |L) confi|g.status|
|000025d0| 0a 0a 63 6c 65 61 6e 3a | 0a 09 72 6d 20 2d 66 20 |..clean:|..rm -f |
|000025e0| 2a 2e 61 20 2a 2e 6f 20 | 63 6f 72 65 20 65 72 72 |*.a *.o |core err|
|000025f0| 73 20 2a 7e 20 5c 23 2a | 20 54 41 47 53 20 2a 2e |s *~ \#*| TAGS *.|
|00002600| 45 20 61 2e 6f 75 74 20 | 65 72 72 6f 72 73 20 74 |E a.out |errors t|
|00002610| 63 6c 73 68 20 74 63 6c | 74 65 73 74 20 5c 0a 09 |clsh tcl|test \..|
|00002620| 09 63 6f 6e 66 69 67 2e | 69 6e 66 6f 0a 0a 64 69 |.config.|info..di|
|00002630| 73 74 63 6c 65 61 6e 3a | 20 63 6c 65 61 6e 0a 09 |stclean:| clean..|
|00002640| 72 6d 20 2d 66 20 4d 61 | 6b 65 66 69 6c 65 20 63 |rm -f Ma|kefile c|
|00002650| 6f 6e 66 69 67 2e 73 74 | 61 74 75 73 20 63 6f 6e |onfig.st|atus con|
|00002660| 66 69 67 2e 63 61 63 68 | 65 0a 0a 64 65 70 65 6e |fig.cach|e..depen|
|00002670| 64 3a 0a 09 6d 61 6b 65 | 64 65 70 65 6e 64 20 2d |d:..make|depend -|
|00002680| 2d 20 24 28 43 43 5f 53 | 57 49 54 43 48 45 53 29 |- $(CC_S|WITCHES)|
|00002690| 20 2d 2d 20 24 28 53 52 | 43 53 29 0a 0a 66 69 78 | -- $(SR|CS)..fix|
|000026a0| 73 74 72 74 6f 64 2e 6f | 3a 20 24 28 53 52 43 5f |strtod.o|: $(SRC_|
|000026b0| 44 49 52 29 2f 63 6f 6d | 70 61 74 2f 66 69 78 73 |DIR)/com|pat/fixs|
|000026c0| 74 72 74 6f 64 2e 63 0a | 09 24 28 43 43 29 20 2d |trtod.c.|.$(CC) -|
|000026d0| 63 20 24 28 43 43 5f 53 | 57 49 54 43 48 45 53 29 |c $(CC_S|WITCHES)|
|000026e0| 20 24 28 53 52 43 5f 44 | 49 52 29 2f 63 6f 6d 70 | $(SRC_D|IR)/comp|
|000026f0| 61 74 2f 66 69 78 73 74 | 72 74 6f 64 2e 63 0a 0a |at/fixst|rtod.c..|
|00002700| 67 65 74 63 77 64 2e 6f | 3a 20 24 28 53 52 43 5f |getcwd.o|: $(SRC_|
|00002710| 44 49 52 29 2f 63 6f 6d | 70 61 74 2f 67 65 74 63 |DIR)/com|pat/getc|
|00002720| 77 64 2e 63 0a 09 24 28 | 43 43 29 20 2d 63 20 24 |wd.c..$(|CC) -c $|
|00002730| 28 43 43 5f 53 57 49 54 | 43 48 45 53 29 20 24 28 |(CC_SWIT|CHES) $(|
|00002740| 53 52 43 5f 44 49 52 29 | 2f 63 6f 6d 70 61 74 2f |SRC_DIR)|/compat/|
|00002750| 67 65 74 63 77 64 2e 63 | 0a 0a 6f 70 65 6e 64 69 |getcwd.c|..opendi|
|00002760| 72 2e 6f 3a 20 24 28 53 | 52 43 5f 44 49 52 29 2f |r.o: $(S|RC_DIR)/|
|00002770| 63 6f 6d 70 61 74 2f 6f | 70 65 6e 64 69 72 2e 63 |compat/o|pendir.c|
|00002780| 0a 09 24 28 43 43 29 20 | 2d 63 20 24 28 43 43 5f |..$(CC) |-c $(CC_|
|00002790| 53 57 49 54 43 48 45 53 | 29 20 24 28 53 52 43 5f |SWITCHES|) $(SRC_|
|000027a0| 44 49 52 29 2f 63 6f 6d | 70 61 74 2f 6f 70 65 6e |DIR)/com|pat/open|
|000027b0| 64 69 72 2e 63 0a 0a 73 | 74 72 65 72 72 6f 72 2e |dir.c..s|trerror.|
|000027c0| 6f 3a 20 24 28 53 52 43 | 5f 44 49 52 29 2f 63 6f |o: $(SRC|_DIR)/co|
|000027d0| 6d 70 61 74 2f 73 74 72 | 65 72 72 6f 72 2e 63 0a |mpat/str|error.c.|
|000027e0| 09 24 28 43 43 29 20 2d | 63 20 24 28 43 43 5f 53 |.$(CC) -|c $(CC_S|
|000027f0| 57 49 54 43 48 45 53 29 | 20 24 28 53 52 43 5f 44 |WITCHES)| $(SRC_D|
|00002800| 49 52 29 2f 63 6f 6d 70 | 61 74 2f 73 74 72 65 72 |IR)/comp|at/strer|
|00002810| 72 6f 72 2e 63 0a 0a 73 | 74 72 6e 63 61 73 65 63 |ror.c..s|trncasec|
|00002820| 6d 70 2e 6f 3a 20 24 28 | 53 52 43 5f 44 49 52 29 |mp.o: $(|SRC_DIR)|
|00002830| 2f 63 6f 6d 70 61 74 2f | 73 74 72 6e 63 61 73 65 |/compat/|strncase|
|00002840| 63 6d 70 2e 63 0a 09 24 | 28 43 43 29 20 2d 63 20 |cmp.c..$|(CC) -c |
|00002850| 24 28 43 43 5f 53 57 49 | 54 43 48 45 53 29 20 24 |$(CC_SWI|TCHES) $|
|00002860| 28 53 52 43 5f 44 49 52 | 29 2f 63 6f 6d 70 61 74 |(SRC_DIR|)/compat|
|00002870| 2f 73 74 72 6e 63 61 73 | 65 63 6d 70 2e 63 0a 0a |/strncas|ecmp.c..|
|00002880| 73 74 72 73 74 72 2e 6f | 3a 20 24 28 53 52 43 5f |strstr.o|: $(SRC_|
|00002890| 44 49 52 29 2f 63 6f 6d | 70 61 74 2f 73 74 72 73 |DIR)/com|pat/strs|
|000028a0| 74 72 2e 63 0a 09 24 28 | 43 43 29 20 2d 63 20 24 |tr.c..$(|CC) -c $|
|000028b0| 28 43 43 5f 53 57 49 54 | 43 48 45 53 29 20 24 28 |(CC_SWIT|CHES) $(|
|000028c0| 53 52 43 5f 44 49 52 29 | 2f 63 6f 6d 70 61 74 2f |SRC_DIR)|/compat/|
|000028d0| 73 74 72 73 74 72 2e 63 | 0a 0a 73 74 72 74 6f 64 |strstr.c|..strtod|
|000028e0| 2e 6f 3a 20 24 28 53 52 | 43 5f 44 49 52 29 2f 63 |.o: $(SR|C_DIR)/c|
|000028f0| 6f 6d 70 61 74 2f 73 74 | 72 74 6f 64 2e 63 0a 09 |ompat/st|rtod.c..|
|00002900| 24 28 43 43 29 20 2d 63 | 20 24 28 43 43 5f 53 57 |$(CC) -c| $(CC_SW|
|00002910| 49 54 43 48 45 53 29 20 | 24 28 53 52 43 5f 44 49 |ITCHES) |$(SRC_DI|
|00002920| 52 29 2f 63 6f 6d 70 61 | 74 2f 73 74 72 74 6f 64 |R)/compa|t/strtod|
|00002930| 2e 63 0a 0a 73 74 72 74 | 6f 6c 2e 6f 3a 20 24 28 |.c..strt|ol.o: $(|
|00002940| 53 52 43 5f 44 49 52 29 | 2f 63 6f 6d 70 61 74 2f |SRC_DIR)|/compat/|
|00002950| 73 74 72 74 6f 6c 2e 63 | 0a 09 24 28 43 43 29 20 |strtol.c|..$(CC) |
|00002960| 2d 63 20 24 28 43 43 5f | 53 57 49 54 43 48 45 53 |-c $(CC_|SWITCHES|
|00002970| 29 20 24 28 53 52 43 5f | 44 49 52 29 2f 63 6f 6d |) $(SRC_|DIR)/com|
|00002980| 70 61 74 2f 73 74 72 74 | 6f 6c 2e 63 0a 0a 73 74 |pat/strt|ol.c..st|
|00002990| 72 74 6f 75 6c 2e 6f 3a | 20 24 28 53 52 43 5f 44 |rtoul.o:| $(SRC_D|
|000029a0| 49 52 29 2f 63 6f 6d 70 | 61 74 2f 73 74 72 74 6f |IR)/comp|at/strto|
|000029b0| 75 6c 2e 63 0a 09 24 28 | 43 43 29 20 2d 63 20 24 |ul.c..$(|CC) -c $|
|000029c0| 28 43 43 5f 53 57 49 54 | 43 48 45 53 29 20 24 28 |(CC_SWIT|CHES) $(|
|000029d0| 53 52 43 5f 44 49 52 29 | 2f 63 6f 6d 70 61 74 2f |SRC_DIR)|/compat/|
|000029e0| 73 74 72 74 6f 75 6c 2e | 63 0a 0a 74 6d 70 6e 61 |strtoul.|c..tmpna|
|000029f0| 6d 2e 6f 3a 20 24 28 53 | 52 43 5f 44 49 52 29 2f |m.o: $(S|RC_DIR)/|
|00002a00| 63 6f 6d 70 61 74 2f 74 | 6d 70 6e 61 6d 2e 63 0a |compat/t|mpnam.c.|
|00002a10| 09 24 28 43 43 29 20 2d | 63 20 24 28 43 43 5f 53 |.$(CC) -|c $(CC_S|
|00002a20| 57 49 54 43 48 45 53 29 | 20 24 28 53 52 43 5f 44 |WITCHES)| $(SRC_D|
|00002a30| 49 52 29 2f 63 6f 6d 70 | 61 74 2f 74 6d 70 6e 61 |IR)/comp|at/tmpna|
|00002a40| 6d 2e 63 0a 0a 77 61 69 | 74 70 69 64 2e 6f 3a 20 |m.c..wai|tpid.o: |
|00002a50| 24 28 53 52 43 5f 44 49 | 52 29 2f 63 6f 6d 70 61 |$(SRC_DI|R)/compa|
|00002a60| 74 2f 77 61 69 74 70 69 | 64 2e 63 0a 09 24 28 43 |t/waitpi|d.c..$(C|
|00002a70| 43 29 20 2d 63 20 24 28 | 43 43 5f 53 57 49 54 43 |C) -c $(|CC_SWITC|
|00002a80| 48 45 53 29 20 24 28 53 | 52 43 5f 44 49 52 29 2f |HES) $(S|RC_DIR)/|
|00002a90| 63 6f 6d 70 61 74 2f 77 | 61 69 74 70 69 64 2e 63 |compat/w|aitpid.c|
|00002aa0| 0a 0a 2e 63 2e 6f 3a 0a | 09 24 28 43 43 29 20 2d |...c.o:.|.$(CC) -|
|00002ab0| 63 20 24 28 43 43 5f 53 | 57 49 54 43 48 45 53 29 |c $(CC_S|WITCHES)|
|00002ac0| 20 24 3c 0a 0a 23 0a 23 | 20 54 61 72 67 65 74 20 | $<..#.#| Target |
|00002ad0| 74 6f 20 63 68 65 63 6b | 20 66 6f 72 20 70 72 6f |to check| for pro|
|00002ae0| 70 65 72 20 75 73 61 67 | 65 20 6f 66 20 55 43 48 |per usag|e of UCH|
|00002af0| 41 52 20 6d 61 63 72 6f | 2e 0a 23 0a 0a 63 68 65 |AR macro|..#..che|
|00002b00| 63 6b 75 63 68 61 72 3a | 0a 09 2d 65 67 72 65 70 |ckuchar:|..-egrep|
|00002b10| 20 69 73 61 6c 6e 75 6d | 5c 7c 69 73 61 6c 70 68 | isalnum|\|isalph|
|00002b20| 61 5c 7c 69 73 63 6e 74 | 72 6c 5c 7c 69 73 64 69 |a\|iscnt|rl\|isdi|
|00002b30| 67 69 74 5c 7c 69 73 6c | 6f 77 65 72 5c 7c 69 73 |git\|isl|ower\|is|
|00002b40| 70 72 69 6e 74 5c 7c 69 | 73 70 75 6e 63 74 5c 7c |print\|i|spunct\||
|00002b50| 69 73 73 70 61 63 65 5c | 7c 69 73 75 70 70 65 72 |isspace\||isupper|
|00002b60| 5c 7c 69 73 78 64 69 67 | 69 74 20 24 28 53 52 43 |\|isxdig|it $(SRC|
|00002b70| 53 29 20 7c 20 67 72 65 | 70 20 2d 76 20 55 43 48 |S) | gre|p -v UCH|
|00002b80| 41 52 0a 0a 23 0a 23 20 | 54 61 72 67 65 74 20 74 |AR..#.# |Target t|
|00002b90| 6f 20 6d 61 6b 65 20 73 | 75 72 65 20 74 68 61 74 |o make s|ure that|
|00002ba0| 20 6f 6e 6c 79 20 73 79 | 6d 62 6f 6c 73 20 77 69 | only sy|mbols wi|
|00002bb0| 74 68 20 22 54 63 6c 22 | 20 70 72 65 66 69 78 65 |th "Tcl"| prefixe|
|00002bc0| 73 20 61 72 65 0a 23 20 | 65 78 70 6f 72 74 65 64 |s are.# |exported|
|00002bd0| 2e 0a 23 0a 0a 63 68 65 | 63 6b 65 78 70 6f 72 74 |..#..che|ckexport|
|00002be0| 73 3a 20 6c 69 62 74 63 | 6c 2e 61 0a 09 2d 6e 6d |s: libtc|l.a..-nm|
|00002bf0| 20 2d 70 20 6c 69 62 74 | 63 6c 2e 61 20 7c 20 61 | -p libt|cl.a | a|
|00002c00| 77 6b 20 27 24 24 32 20 | 7e 20 2f 5b 54 44 42 5d |wk '$$2 |~ /[TDB]|
|00002c10| 2f 20 7b 20 70 72 69 6e | 74 20 24 24 33 20 7d 27 |/ { prin|t $$3 }'|
|00002c20| 20 7c 20 73 6f 72 74 20 | 2d 6e 20 7c 20 67 72 65 | | sort |-n | gre|
|00002c30| 70 20 2d 76 20 27 5e 5b | 54 74 5d 63 6c 27 0a 0a |p -v '^[|Tt]cl'..|
|00002c40| 23 0a 23 20 54 61 72 67 | 65 74 20 74 6f 20 63 72 |#.# Targ|et to cr|
|00002c50| 65 61 74 65 20 61 20 70 | 72 6f 70 65 72 20 54 63 |eate a p|roper Tc|
|00002c60| 6c 20 64 69 73 74 72 69 | 62 75 74 69 6f 6e 20 66 |l distri|bution f|
|00002c70| 72 6f 6d 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |rom info|rmation |
|00002c80| 69 6e 20 74 68 65 0a 23 | 20 6d 61 73 74 65 72 20 |in the.#| master |
|00002c90| 73 6f 75 72 63 65 20 64 | 69 72 65 63 74 6f 72 79 |source d|irectory|
|00002ca0| 2e 20 20 44 49 53 54 44 | 49 52 20 6d 75 73 74 20 |. DISTD|IR must |
|00002cb0| 62 65 20 64 65 66 69 6e | 65 64 20 74 6f 20 69 6e |be defin|ed to in|
|00002cc0| 64 69 63 61 74 65 20 77 | 68 65 72 65 0a 23 20 74 |dicate w|here.# t|
|00002cd0| 6f 20 70 75 74 20 74 68 | 65 20 64 69 73 74 72 69 |o put th|e distri|
|00002ce0| 62 75 74 69 6f 6e 2e 0a | 23 0a 0a 63 6f 6e 66 69 |bution..|#..confi|
|00002cf0| 67 75 72 65 3a 20 63 6f | 6e 66 69 67 75 72 65 2e |gure: co|nfigure.|
|00002d00| 69 6e 0a 09 61 75 74 6f | 63 6f 6e 66 0a 64 69 73 |in..auto|conf.dis|
|00002d10| 74 3a 20 63 6f 6e 66 69 | 67 75 72 65 0a 09 72 6d |t: confi|gure..rm|
|00002d20| 20 2d 72 66 20 24 28 44 | 49 53 54 44 49 52 29 0a | -rf $(D|ISTDIR).|
|00002d30| 09 6d 6b 64 69 72 20 24 | 28 44 49 53 54 44 49 52 |.mkdir $|(DISTDIR|
|00002d40| 29 0a 09 63 70 20 4d 61 | 6b 65 66 69 6c 65 2e 69 |)..cp Ma|kefile.i|
|00002d50| 6e 20 24 28 44 49 53 54 | 44 49 52 29 0a 09 63 68 |n $(DIST|DIR)..ch|
|00002d60| 6d 6f 64 20 36 36 34 20 | 24 28 44 49 53 54 44 49 |mod 664 |$(DISTDI|
|00002d70| 52 29 2f 4d 61 6b 65 66 | 69 6c 65 2e 69 6e 0a 09 |R)/Makef|ile.in..|
|00002d80| 63 70 20 2d 70 20 24 28 | 53 52 43 53 29 20 24 28 |cp -p $(|SRCS) $(|
|00002d90| 44 49 53 54 44 49 52 29 | 0a 09 63 70 20 2d 70 20 |DISTDIR)|..cp -p |
|00002da0| 74 63 6c 52 65 67 65 78 | 70 2e 68 20 74 63 6c 2e |tclRegex|p.h tcl.|
|00002db0| 68 20 74 63 6c 49 6e 74 | 2e 68 20 74 63 6c 50 6f |h tclInt|.h tclPo|
|00002dc0| 72 74 2e 68 20 70 61 74 | 63 68 6c 65 76 65 6c 2e |rt.h pat|chlevel.|
|00002dd0| 68 20 24 28 44 49 53 54 | 44 49 52 29 0a 09 63 70 |h $(DIST|DIR)..cp|
|00002de0| 20 63 6f 6e 66 69 67 75 | 72 65 20 63 6f 6e 66 69 | configu|re confi|
|00002df0| 67 75 72 65 2e 69 6e 20 | 24 28 44 49 53 54 44 49 |gure.in |$(DISTDI|
|00002e00| 52 29 0a 09 63 68 6d 6f | 64 20 37 37 35 20 24 28 |R)..chmo|d 775 $(|
|00002e10| 44 49 53 54 44 49 52 29 | 2f 63 6f 6e 66 69 67 75 |DISTDIR)|/configu|
|00002e20| 72 65 20 24 28 44 49 53 | 54 44 49 52 29 2f 63 6f |re $(DIS|TDIR)/co|
|00002e30| 6e 66 69 67 75 72 65 2e | 69 6e 0a 09 63 70 20 2d |nfigure.|in..cp -|
|00002e40| 70 20 63 68 61 6e 67 65 | 73 20 52 45 41 44 4d 45 |p change|s README|
|00002e50| 20 70 6f 72 74 69 6e 67 | 2e 6e 6f 74 65 73 20 70 | porting|.notes p|
|00002e60| 6f 72 74 69 6e 67 2e 6f | 6c 64 20 6c 69 63 65 6e |orting.o|ld licen|
|00002e70| 73 65 2e 74 65 72 6d 73 | 20 5c 0a 09 09 69 6e 73 |se.terms| \...ins|
|00002e80| 74 61 6c 6c 2d 73 68 20 | 24 28 44 49 53 54 44 49 |tall-sh |$(DISTDI|
|00002e90| 52 29 0a 09 63 68 6d 6f | 64 20 2b 78 20 24 28 44 |R)..chmo|d +x $(D|
|00002ea0| 49 53 54 44 49 52 29 2f | 69 6e 73 74 61 6c 6c 2d |ISTDIR)/|install-|
|00002eb0| 73 68 0a 09 6d 6b 64 69 | 72 20 24 28 44 49 53 54 |sh..mkdi|r $(DIST|
|00002ec0| 44 49 52 29 2f 6c 69 62 | 72 61 72 79 0a 09 63 70 |DIR)/lib|rary..cp|
|00002ed0| 20 2d 70 20 6c 69 63 65 | 6e 73 65 2e 74 65 72 6d | -p lice|nse.term|
|00002ee0| 73 20 6c 69 62 72 61 72 | 79 2f 2a 2e 74 63 6c 20 |s librar|y/*.tcl |
|00002ef0| 6c 69 62 72 61 72 79 2f | 74 63 6c 49 6e 64 65 78 |library/|tclIndex|
|00002f00| 20 24 28 44 49 53 54 44 | 49 52 29 2f 6c 69 62 72 | $(DISTD|IR)/libr|
|00002f10| 61 72 79 0a 09 6d 6b 64 | 69 72 20 24 28 44 49 53 |ary..mkd|ir $(DIS|
|00002f20| 54 44 49 52 29 2f 64 6f | 63 0a 09 63 70 20 2d 70 |TDIR)/do|c..cp -p|
|00002f30| 20 6c 69 63 65 6e 73 65 | 2e 74 65 72 6d 73 20 64 | license|.terms d|
|00002f40| 6f 63 2f 2a 2e 5b 31 33 | 6e 5d 20 64 6f 63 2f 6d |oc/*.[13|n] doc/m|
|00002f50| 61 6e 2e 6d 61 63 72 6f | 73 20 24 28 44 49 53 54 |an.macro|s $(DIST|
|00002f60| 44 49 52 29 2f 64 6f 63 | 0a 09 6d 6b 64 69 72 20 |DIR)/doc|..mkdir |
|00002f70| 24 28 44 49 53 54 44 49 | 52 29 2f 63 6f 6d 70 61 |$(DISTDI|R)/compa|
|00002f80| 74 0a 09 63 70 20 2d 70 | 20 6c 69 63 65 6e 73 65 |t..cp -p| license|
|00002f90| 2e 74 65 72 6d 73 20 63 | 6f 6d 70 61 74 2f 2a 2e |.terms c|ompat/*.|
|00002fa0| 63 20 63 6f 6d 70 61 74 | 2f 2a 2e 68 20 63 6f 6d |c compat|/*.h com|
|00002fb0| 70 61 74 2f 52 45 41 44 | 4d 45 20 5c 0a 09 09 24 |pat/READ|ME \...$|
|00002fc0| 28 44 49 53 54 44 49 52 | 29 2f 63 6f 6d 70 61 74 |(DISTDIR|)/compat|
|00002fd0| 0a 09 6d 6b 64 69 72 20 | 24 28 44 49 53 54 44 49 |..mkdir |$(DISTDI|
|00002fe0| 52 29 2f 74 65 73 74 73 | 0a 09 63 70 20 2d 70 20 |R)/tests|..cp -p |
|00002ff0| 6c 69 63 65 6e 73 65 2e | 74 65 72 6d 73 20 24 28 |license.|terms $(|
|00003000| 44 49 53 54 44 49 52 29 | 2f 74 65 73 74 73 0a 09 |DISTDIR)|/tests..|
|00003010| 63 70 20 2d 70 20 74 65 | 73 74 73 2f 2a 2e 74 65 |cp -p te|sts/*.te|
|00003020| 73 74 20 74 65 73 74 73 | 2f 52 45 41 44 4d 45 20 |st tests|/README |
|00003030| 74 65 73 74 73 2f 61 6c | 6c 20 74 65 73 74 73 2f |tests/al|l tests/|
|00003040| 64 65 66 73 20 24 28 44 | 49 53 54 44 49 52 29 2f |defs $(D|ISTDIR)/|
|00003050| 74 65 73 74 73 0a 0a 23 | 20 44 4f 20 4e 4f 54 20 |tests..#| DO NOT |
|00003060| 44 45 4c 45 54 45 20 54 | 48 49 53 20 4c 49 4e 45 |DELETE T|HIS LINE|
|00003070| 20 2d 2d 20 6d 61 6b 65 | 20 64 65 70 65 6e 64 20 | -- make| depend |
|00003080| 64 65 70 65 6e 64 73 20 | 6f 6e 20 69 74 2e 0a 77 |depends |on it..w|
|00003090| 68 69 63 68 20 74 6f 20 | 69 6e 73 74 61 6c 6c 20 |hich to |install |
|000030a0| 6d 61 6e 75 61 6c 20 65 | 6e 74 72 79 20 66 6f 72 |manual e|ntry for|
|000030b0| 20 74 63 6c 73 68 3a 0a | 4d 41 4e 31 5f 49 4e 53 | tclsh:.|MAN1_INS|
|000030c0| 54 41 4c 4c 5f 44 49 52 | 20 3d 09 24 28 4d 41 4e |TALL_DIR| =.$(MAN|
|000030d0| 5f 49 4e 53 54 41 4c 4c | 5f 44 49 52 29 2f 6d 61 |_INSTALL|_DIR)/ma|
|000030e0| 6e 31 0a 0a 23 20 44 69 | 72 65 63 74 6f 72 79 20 |n1..# Di|rectory |
|000030f0| 69 6e 20 77 68 69 63 68 | 20 74 6f 20 69 6e 73 74 |in which| to inst|
|00003100| 61 6c 6c 20 6d 61 6e 75 | 61 6c 20 65 6e 74 72 69 |all manu|al entri|
|00003110| 65 73 20 66 6f 72 20 54 | 63 6c 27 73 20 43 20 6c |es for T|cl's C l|
|00003120| 69 62 72 61 72 79 0a 23 | 20 70 72 6f 63 65 64 75 |ibrary.#| procedu|
|00003130| 72 65 73 3a 0a 4d 41 4e | 33 5f 49 4e 53 54 41 4c |res:.MAN|3_INSTAL|
|00003140| 4c 5f 44 49 52 20 3d 09 | 24 28 4d 41 4e 5f 49 4e |L_DIR =.|$(MAN_IN|
|00003150| 53 54 41 4c 4c 5f 44 49 | 52 29 2f 6d 61 6e 33 0a |STALL_DI|R)/man3.|
|00003160| 0a 23 20 44 69 72 65 63 | 74 6f 72 79 20 69 6e 20 |.# Direc|tory in |
|00003170| 77 68 69 63 68 20 74 6f | 20 69 6e 73 74 61 6c 6c |which to| install|
|00003180| 20 6d 61 6e 75 61 6c 20 | 65 6e 74 72 69 65 73 20 | manual |entries |
|00003190| 66 6f 72 20 74 68 65 20 | 62 75 69 6c 74 2d 69 6e |for the |built-in|
|000031a0| 0a 23 20 54 63 6c 20 63 | 6f 6d 6d 61 6e 64 73 3a |.# Tcl c|ommands:|
|000031b0| 0a 4d 41 4e 4e 5f 49 4e | 53 54 41 4c 4c 5f 44 49 |.MANN_IN|STALL_DI|
|000031c0| 52 20 3d 09 24 28 4d 41 | 4e 5f 49 4e 53 54 41 4c |R =.$(MA|N_INSTAL|
|000031d0| 4c 5f 44 49 52 29 2f 6d | 61 6e 6e 0a 0a 23 20 54 |L_DIR)/m|ann..# T|
|000031e0| 6f 20 63 68 61 6e 67 65 | 20 74 68 65 20 63 6f 6d |o change| the com|
|000031f0| 70 69 6c 65 72 20 73 77 | 69 74 63 68 65 73 2c 20 |piler sw|itches, |
|00003200| 74 63 6c 37 2e 34 2f 72 | 65 67 65 78 70 2e 63 00 |tcl7.4/r|egexp.c.|
|00003210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003260| 00 00 00 00 30 31 30 30 | 34 34 34 00 30 30 36 33 |....0100|444.0063|
|00003270| 30 35 31 00 30 30 30 30 | 30 31 32 00 30 30 30 30 |051.0000|012.0000|
|00003280| 30 30 37 36 32 35 35 00 | 30 35 37 37 32 33 30 37 |0076255.|05772307|
|00003290| 35 34 34 00 30 30 31 34 | 32 37 32 00 30 00 00 00 |544.0014|272.0...|
|000032a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003300| 00 75 73 74 61 72 00 30 | 30 6f 75 73 74 65 72 00 |.ustar.0|0ouster.|
|00003310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003320| 00 00 00 00 00 00 00 00 | 00 73 74 61 66 66 00 00 |........|.staff..|
|00003330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003340| 00 00 00 00 00 00 00 00 | 00 30 30 30 30 32 33 34 |........|.0000234|
|00003350| 00 30 30 30 30 30 31 30 | 00 00 00 00 00 00 00 00 |.0000010|........|
|00003360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003400| 2f 2a 0a 20 2a 20 54 63 | 6c 52 65 67 43 6f 6d 70 |/*. * Tc|lRegComp|
|00003410| 20 61 6e 64 20 54 63 6c | 52 65 67 45 78 65 63 20 | and Tcl|RegExec |
|00003420| 2d 2d 20 54 63 6c 52 65 | 67 53 75 62 20 69 73 20 |-- TclRe|gSub is |
|00003430| 65 6c 73 65 77 68 65 72 | 65 0a 20 2a 0a 20 2a 09 |elsewher|e. *. *.|
|00003440| 43 6f 70 79 72 69 67 68 | 74 20 28 63 29 20 31 39 |Copyrigh|t (c) 19|
|00003450| 38 36 20 62 79 20 55 6e | 69 76 65 72 73 69 74 79 |86 by Un|iversity|
|00003460| 20 6f 66 20 54 6f 72 6f | 6e 74 6f 2e 0a 20 2a 09 | of Toro|nto.. *.|
|00003470| 57 72 69 74 74 65 6e 20 | 62 79 20 48 65 6e 72 79 |Written |by Henry|
|00003480| 20 53 70 65 6e 63 65 72 | 2e 20 20 4e 6f 74 20 64 | Spencer|. Not d|
|00003490| 65 72 69 76 65 64 20 66 | 72 6f 6d 20 6c 69 63 65 |erived f|rom lice|
|000034a0| 6e 73 65 64 20 73 6f 66 | 74 77 61 72 65 2e 0a 20 |nsed sof|tware.. |
|000034b0| 2a 0a 20 2a 09 50 65 72 | 6d 69 73 73 69 6f 6e 20 |*. *.Per|mission |
|000034c0| 69 73 20 67 72 61 6e 74 | 65 64 20 74 6f 20 61 6e |is grant|ed to an|
|000034d0| 79 6f 6e 65 20 74 6f 20 | 75 73 65 20 74 68 69 73 |yone to |use this|
|000034e0| 20 73 6f 66 74 77 61 72 | 65 20 66 6f 72 20 61 6e | softwar|e for an|
|000034f0| 79 0a 20 2a 09 70 75 72 | 70 6f 73 65 20 6f 6e 20 |y. *.pur|pose on |
|00003500| 61 6e 79 20 63 6f 6d 70 | 75 74 65 72 20 73 79 73 |any comp|uter sys|
|00003510| 74 65 6d 2c 20 61 6e 64 | 20 74 6f 20 72 65 64 69 |tem, and| to redi|
|00003520| 73 74 72 69 62 75 74 65 | 20 69 74 20 66 72 65 65 |stribute| it free|
|00003530| 6c 79 2c 0a 20 2a 09 73 | 75 62 6a 65 63 74 20 74 |ly,. *.s|ubject t|
|00003540| 6f 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |o the fo|llowing |
|00003550| 72 65 73 74 72 69 63 74 | 69 6f 6e 73 3a 0a 20 2a |restrict|ions:. *|
|00003560| 0a 20 2a 09 31 2e 20 54 | 68 65 20 61 75 74 68 6f |. *.1. T|he autho|
|00003570| 72 20 69 73 20 6e 6f 74 | 20 72 65 73 70 6f 6e 73 |r is not| respons|
|00003580| 69 62 6c 65 20 66 6f 72 | 20 74 68 65 20 63 6f 6e |ible for| the con|
|00003590| 73 65 71 75 65 6e 63 65 | 73 20 6f 66 20 75 73 65 |sequence|s of use|
|000035a0| 20 6f 66 0a 20 2a 09 09 | 74 68 69 73 20 73 6f 66 | of. *..|this sof|
|000035b0| 74 77 61 72 65 2c 20 6e | 6f 20 6d 61 74 74 65 72 |tware, n|o matter|
|000035c0| 20 68 6f 77 20 61 77 66 | 75 6c 2c 20 65 76 65 6e | how awf|ul, even|
|000035d0| 20 69 66 20 74 68 65 79 | 20 61 72 69 73 65 0a 20 | if they| arise. |
|000035e0| 2a 09 09 66 72 6f 6d 20 | 64 65 66 65 63 74 73 20 |*..from |defects |
|000035f0| 69 6e 20 69 74 2e 0a 20 | 2a 0a 20 2a 09 32 2e 20 |in it.. |*. *.2. |
|00003600| 54 68 65 20 6f 72 69 67 | 69 6e 20 6f 66 20 74 68 |The orig|in of th|
|00003610| 69 73 20 73 6f 66 74 77 | 61 72 65 20 6d 75 73 74 |is softw|are must|
|00003620| 20 6e 6f 74 20 62 65 20 | 6d 69 73 72 65 70 72 65 | not be |misrepre|
|00003630| 73 65 6e 74 65 64 2c 20 | 65 69 74 68 65 72 0a 20 |sented, |either. |
|00003640| 2a 09 09 62 79 20 65 78 | 70 6c 69 63 69 74 20 63 |*..by ex|plicit c|
|00003650| 6c 61 69 6d 20 6f 72 20 | 62 79 20 6f 6d 69 73 73 |laim or |by omiss|
|00003660| 69 6f 6e 2e 0a 20 2a 0a | 20 2a 09 33 2e 20 41 6c |ion.. *.| *.3. Al|
|00003670| 74 65 72 65 64 20 76 65 | 72 73 69 6f 6e 73 20 6d |tered ve|rsions m|
|00003680| 75 73 74 20 62 65 20 70 | 6c 61 69 6e 6c 79 20 6d |ust be p|lainly m|
|00003690| 61 72 6b 65 64 20 61 73 | 20 73 75 63 68 2c 20 61 |arked as| such, a|
|000036a0| 6e 64 20 6d 75 73 74 20 | 6e 6f 74 0a 20 2a 09 09 |nd must |not. *..|
|000036b0| 62 65 20 6d 69 73 72 65 | 70 72 65 73 65 6e 74 65 |be misre|presente|
|000036c0| 64 20 61 73 20 62 65 69 | 6e 67 20 74 68 65 20 6f |d as bei|ng the o|
|000036d0| 72 69 67 69 6e 61 6c 20 | 73 6f 66 74 77 61 72 65 |riginal |software|
|000036e0| 2e 0a 20 2a 0a 20 2a 20 | 42 65 77 61 72 65 20 74 |.. *. * |Beware t|
|000036f0| 68 61 74 20 73 6f 6d 65 | 20 6f 66 20 74 68 69 73 |hat some| of this|
|00003700| 20 63 6f 64 65 20 69 73 | 20 73 75 62 74 6c 79 20 | code is| subtly |
|00003710| 61 77 61 72 65 20 6f 66 | 20 74 68 65 20 77 61 79 |aware of| the way|
|00003720| 20 6f 70 65 72 61 74 6f | 72 0a 20 2a 20 70 72 65 | operato|r. * pre|
|00003730| 63 65 64 65 6e 63 65 20 | 69 73 20 73 74 72 75 63 |cedence |is struc|
|00003740| 74 75 72 65 64 20 69 6e | 20 72 65 67 75 6c 61 72 |tured in| regular|
|00003750| 20 65 78 70 72 65 73 73 | 69 6f 6e 73 2e 20 20 53 | express|ions. S|
|00003760| 65 72 69 6f 75 73 20 63 | 68 61 6e 67 65 73 20 69 |erious c|hanges i|
|00003770| 6e 0a 20 2a 20 72 65 67 | 75 6c 61 72 2d 65 78 70 |n. * reg|ular-exp|
|00003780| 72 65 73 73 69 6f 6e 20 | 73 79 6e 74 61 78 20 6d |ression |syntax m|
|00003790| 69 67 68 74 20 72 65 71 | 75 69 72 65 20 61 20 74 |ight req|uire a t|
|000037a0| 6f 74 61 6c 20 72 65 74 | 68 69 6e 6b 2e 0a 20 2a |otal ret|hink.. *|
|000037b0| 0a 20 2a 20 2a 2a 2a 20 | 4e 4f 54 45 3a 20 74 68 |. * *** |NOTE: th|
|000037c0| 69 73 20 63 6f 64 65 20 | 68 61 73 20 62 65 65 6e |is code |has been|
|000037d0| 20 61 6c 74 65 72 65 64 | 20 73 6c 69 67 68 74 6c | altered| slightl|
|000037e0| 79 20 66 6f 72 20 75 73 | 65 20 69 6e 20 54 63 6c |y for us|e in Tcl|
|000037f0| 3a 20 2a 2a 2a 0a 20 2a | 20 2a 2a 2a 20 31 2e 20 |: ***. *| *** 1. |
|00003800| 55 73 65 20 63 6b 61 6c | 6c 6f 63 20 61 6e 64 20 |Use ckal|loc and |
|00003810| 63 6b 66 72 65 65 20 69 | 6e 73 74 65 61 64 20 6f |ckfree i|nstead o|
|00003820| 66 20 20 6d 61 6c 6c 6f | 63 20 61 6e 64 20 66 72 |f mallo|c and fr|
|00003830| 65 65 2e 09 20 2a 2a 2a | 0a 20 2a 20 2a 2a 2a 20 |ee.. ***|. * *** |
|00003840| 32 2e 20 41 64 64 20 65 | 78 74 72 61 20 61 72 67 |2. Add e|xtra arg|
|00003850| 75 6d 65 6e 74 20 74 6f | 20 72 65 67 65 78 70 20 |ument to| regexp |
|00003860| 74 6f 20 73 70 65 63 69 | 66 79 20 74 68 65 20 72 |to speci|fy the r|
|00003870| 65 61 6c 09 20 2a 2a 2a | 0a 20 2a 20 2a 2a 2a 20 |eal. ***|. * *** |
|00003880| 20 20 20 73 74 61 72 74 | 20 6f 66 20 74 68 65 20 | start| of the |
|00003890| 73 74 72 69 6e 67 20 73 | 65 70 61 72 61 74 65 6c |string s|eparatel|
|000038a0| 79 20 66 72 6f 6d 20 74 | 68 65 20 73 74 61 72 74 |y from t|he start|
|000038b0| 20 6f 66 20 74 68 65 09 | 20 2a 2a 2a 0a 20 2a 20 | of the.| ***. * |
|000038c0| 2a 2a 2a 20 20 20 20 63 | 75 72 72 65 6e 74 20 73 |*** c|urrent s|
|000038d0| 65 61 72 63 68 2e 20 54 | 68 69 73 20 69 73 20 6e |earch. T|his is n|
|000038e0| 65 65 64 65 64 20 74 6f | 20 73 65 61 72 63 68 20 |eeded to| search |
|000038f0| 66 6f 72 20 6d 75 6c 74 | 69 70 6c 65 09 20 2a 2a |for mult|iple. **|
|00003900| 2a 0a 20 2a 20 2a 2a 2a | 20 20 20 20 6d 61 74 63 |*. * ***| matc|
|00003910| 68 65 73 20 77 69 74 68 | 69 6e 20 61 20 73 74 72 |hes with|in a str|
|00003920| 69 6e 67 2e 09 09 09 09 | 20 2a 2a 2a 0a 20 2a 20 |ing.....| ***. * |
|00003930| 2a 2a 2a 20 33 2e 20 4e | 61 6d 65 73 20 68 61 76 |*** 3. N|ames hav|
|00003940| 65 20 62 65 65 6e 20 63 | 68 61 6e 67 65 64 2c 20 |e been c|hanged, |
|00003950| 65 2e 67 2e 20 66 72 6f | 6d 20 72 65 67 63 6f 6d |e.g. fro|m regcom|
|00003960| 70 20 74 6f 09 09 20 2a | 2a 2a 0a 20 2a 20 2a 2a |p to.. *|**. * **|
|00003970| 2a 20 20 20 20 54 63 6c | 52 65 67 43 6f 6d 70 2c |* Tcl|RegComp,|
|00003980| 20 74 6f 20 61 76 6f 69 | 64 20 63 6c 61 73 68 65 | to avoi|d clashe|
|00003990| 73 20 77 69 74 68 20 6f | 74 68 65 72 20 09 09 20 |s with o|ther .. |
|000039a0| 2a 2a 2a 0a 20 2a 20 2a | 2a 2a 20 20 20 20 72 65 |***. * *|** re|
|000039b0| 67 65 78 70 20 69 6d 70 | 6c 65 6d 65 6e 74 61 74 |gexp imp|lementat|
|000039c0| 69 6f 6e 73 20 75 73 65 | 64 20 62 79 20 61 70 70 |ions use|d by app|
|000039d0| 6c 69 63 61 74 69 6f 6e | 73 2e 20 09 09 20 2a 2a |lication|s. .. **|
|000039e0| 2a 0a 20 2a 20 2a 2a 2a | 20 34 2e 20 41 64 64 65 |*. * ***| 4. Adde|
|000039f0| 64 20 65 72 72 4d 73 67 | 20 64 65 63 6c 61 72 61 |d errMsg| declara|
|00003a00| 74 69 6f 6e 20 61 6e 64 | 20 54 63 6c 52 65 67 45 |tion and| TclRegE|
|00003a10| 72 72 6f 72 20 70 72 6f | 63 65 64 75 72 65 09 20 |rror pro|cedure. |
|00003a20| 2a 2a 2a 0a 20 2a 20 2a | 2a 2a 20 35 2e 20 56 61 |***. * *|** 5. Va|
|00003a30| 72 69 6f 75 73 20 6c 69 | 6e 74 2d 6c 69 6b 65 20 |rious li|nt-like |
|00003a40| 74 68 69 6e 67 73 2c 20 | 73 75 63 68 20 61 73 20 |things, |such as |
|00003a50| 63 61 73 74 69 6e 67 20 | 61 72 67 75 6d 65 6e 74 |casting |argument|
|00003a60| 73 09 20 2a 2a 2a 0a 20 | 2a 20 2a 2a 2a 09 20 20 |s. ***. |* ***. |
|00003a70| 69 6e 20 70 72 6f 63 65 | 64 75 72 65 20 63 61 6c |in proce|dure cal|
|00003a80| 6c 73 2e 09 09 09 09 09 | 20 2a 2a 2a 0a 20 2a 0a |ls......| ***. *.|
|00003a90| 20 2a 20 2a 2a 2a 20 4e | 4f 54 45 3a 20 54 68 69 | * *** N|OTE: Thi|
|00003aa0| 73 20 63 6f 64 65 20 68 | 61 73 20 62 65 65 6e 20 |s code h|as been |
|00003ab0| 61 6c 74 65 72 65 64 20 | 66 6f 72 20 75 73 65 20 |altered |for use |
|00003ac0| 69 6e 20 4d 54 2d 53 74 | 75 72 64 79 20 54 63 6c |in MT-St|urdy Tcl|
|00003ad0| 20 2a 2a 2a 0a 20 2a 20 | 2a 2a 2a 20 31 2e 20 41 | ***. * |*** 1. A|
|00003ae0| 6c 6c 20 75 73 65 20 6f | 66 20 73 74 61 74 69 63 |ll use o|f static|
|00003af0| 20 76 61 72 69 61 62 6c | 65 73 20 68 61 73 20 62 | variabl|es has b|
|00003b00| 65 65 6e 20 63 68 61 6e | 67 65 64 20 74 6f 20 61 |een chan|ged to a|
|00003b10| 63 63 65 73 73 20 2a 2a | 2a 0a 20 2a 20 2a 2a 2a |ccess **|*. * ***|
|00003b20| 20 20 20 20 66 69 65 6c | 64 73 20 6f 66 20 61 20 | fiel|ds of a |
|00003b30| 73 74 72 75 63 74 75 72 | 65 2e 20 20 20 20 20 20 |structur|e. |
|00003b40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003b50| 20 20 20 20 20 20 20 20 | 20 20 20 2a 2a 2a 0a 20 | | ***. |
|00003b60| 2a 20 2a 2a 2a 20 32 2e | 20 54 68 69 73 20 69 6e |* *** 2.| This in|
|00003b70| 20 61 64 64 69 74 69 6f | 6e 20 74 6f 20 63 68 61 | additio|n to cha|
|00003b80| 6e 67 65 73 20 74 6f 20 | 54 63 6c 52 65 67 45 72 |nges to |TclRegEr|
|00003b90| 72 6f 72 20 6d 61 6b 65 | 73 20 74 68 65 20 20 20 |ror make|s the |
|00003ba0| 2a 2a 2a 0a 20 2a 20 2a | 2a 2a 20 20 20 20 63 6f |***. * *|** co|
|00003bb0| 64 65 20 6d 75 6c 74 69 | 2d 74 68 72 65 61 64 20 |de multi|-thread |
|00003bc0| 73 61 66 65 2e 20 20 20 | 20 20 20 20 20 20 20 20 |safe. | |
|00003bd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003be0| 20 20 20 20 20 2a 2a 2a | 0a 20 2a 2f 0a 0a 73 74 | ***|. */..st|
|00003bf0| 61 74 69 63 20 63 68 61 | 72 20 73 63 63 73 69 64 |atic cha|r sccsid|
|00003c00| 5b 5d 20 3d 20 22 40 28 | 23 29 20 72 65 67 65 78 |[] = "@(|#) regex|
|00003c10| 70 2e 63 20 31 2e 37 20 | 39 35 2f 30 36 2f 32 32 |p.c 1.7 |95/06/22|
|00003c20| 20 30 38 3a 34 32 3a 32 | 38 22 3b 0a 0a 23 69 6e | 08:42:2|8";..#in|
|00003c30| 63 6c 75 64 65 20 22 74 | 63 6c 49 6e 74 2e 68 22 |clude "t|clInt.h"|
|00003c40| 0a 23 69 6e 63 6c 75 64 | 65 20 22 74 63 6c 50 6f |.#includ|e "tclPo|
|00003c50| 72 74 2e 68 22 0a 0a 2f | 2a 0a 20 2a 20 54 68 65 |rt.h"../|*. * The|
|00003c60| 20 76 61 72 69 61 62 6c | 65 20 62 65 6c 6f 77 20 | variabl|e below |
|00003c70| 69 73 20 73 65 74 20 74 | 6f 20 4e 55 4c 4c 20 62 |is set t|o NULL b|
|00003c80| 65 66 6f 72 65 20 69 6e | 76 6f 6b 69 6e 67 20 72 |efore in|voking r|
|00003c90| 65 67 65 78 70 20 66 75 | 6e 63 74 69 6f 6e 73 0a |egexp fu|nctions.|
|00003ca0| 20 2a 20 61 6e 64 20 63 | 68 65 63 6b 65 64 20 61 | * and c|hecked a|
|00003cb0| 66 74 65 72 20 74 68 6f | 73 65 20 66 75 6e 63 74 |fter tho|se funct|
|00003cc0| 69 6f 6e 73 2e 20 20 49 | 66 20 61 6e 20 65 72 72 |ions. I|f an err|
|00003cd0| 6f 72 20 6f 63 63 75 72 | 72 65 64 20 74 68 65 6e |or occur|red then|
|00003ce0| 20 54 63 6c 52 65 67 45 | 72 72 6f 72 0a 20 2a 20 | TclRegE|rror. * |
|00003cf0| 77 69 6c 6c 20 73 65 74 | 20 74 68 65 20 76 61 72 |will set| the var|
|00003d00| 69 61 62 6c 65 20 74 6f | 20 70 6f 69 6e 74 20 74 |iable to| point t|
|00003d10| 6f 20 61 20 28 73 74 61 | 74 69 63 29 20 65 72 72 |o a (sta|tic) err|
|00003d20| 6f 72 20 6d 65 73 73 61 | 67 65 2e 20 20 54 68 69 |or messa|ge. Thi|
|00003d30| 73 0a 20 2a 20 6d 65 63 | 68 61 6e 69 73 6d 20 75 |s. * mec|hanism u|
|00003d40| 6e 66 6f 72 74 75 6e 61 | 74 65 6c 79 20 64 6f 65 |nfortuna|tely doe|
|00003d50| 73 20 6e 6f 74 20 73 75 | 70 70 6f 72 74 20 6d 75 |s not su|pport mu|
|00003d60| 6c 74 69 2d 74 68 72 65 | 61 64 69 6e 67 2c 20 62 |lti-thre|ading, b|
|00003d70| 75 74 20 74 68 65 0a 20 | 2a 20 70 72 6f 63 65 64 |ut the. |* proced|
|00003d80| 75 72 65 73 20 54 63 6c | 52 65 67 45 72 72 6f 72 |ures Tcl|RegError|
|00003d90| 20 61 6e 64 20 54 63 6c | 47 65 74 52 65 67 45 72 | and Tcl|GetRegEr|
|00003da0| 72 6f 72 20 63 61 6e 20 | 62 65 20 6d 6f 64 69 66 |ror can |be modif|
|00003db0| 69 65 64 20 74 6f 20 75 | 73 65 0a 20 2a 20 74 68 |ied to u|se. * th|
|00003dc0| 72 65 61 64 2d 73 70 65 | 63 69 66 69 63 20 73 74 |read-spe|cific st|
|00003dd0| 6f 72 61 67 65 20 66 6f | 72 20 74 68 65 20 76 61 |orage fo|r the va|
|00003de0| 72 69 61 62 6c 65 20 61 | 6e 64 20 74 68 65 72 65 |riable a|nd there|
|00003df0| 62 79 20 6d 61 6b 65 20 | 74 68 65 20 63 6f 64 65 |by make |the code|
|00003e00| 0a 20 2a 20 74 68 72 65 | 61 64 2d 73 61 66 65 2e |. * thre|ad-safe.|
|00003e10| 0a 20 2a 2f 0a 0a 73 74 | 61 74 69 63 20 63 68 61 |. */..st|atic cha|
|00003e20| 72 20 2a 65 72 72 4d 73 | 67 20 3d 20 4e 55 4c 4c |r *errMs|g = NULL|
|00003e30| 3b 0a 0a 2f 2a 0a 20 2a | 20 54 68 65 20 22 69 6e |;../*. *| The "in|
|00003e40| 74 65 72 6e 61 6c 20 75 | 73 65 20 6f 6e 6c 79 22 |ternal u|se only"|
|00003e50| 20 66 69 65 6c 64 73 20 | 69 6e 20 72 65 67 65 78 | fields |in regex|
|00003e60| 70 2e 68 20 61 72 65 20 | 70 72 65 73 65 6e 74 20 |p.h are |present |
|00003e70| 74 6f 20 70 61 73 73 20 | 69 6e 66 6f 20 66 72 6f |to pass |info fro|
|00003e80| 6d 0a 20 2a 20 63 6f 6d | 70 69 6c 65 20 74 6f 20 |m. * com|pile to |
|00003e90| 65 78 65 63 75 74 65 20 | 74 68 61 74 20 70 65 72 |execute |that per|
|00003ea0| 6d 69 74 73 20 74 68 65 | 20 65 78 65 63 75 74 65 |mits the| execute|
|00003eb0| 20 70 68 61 73 65 20 74 | 6f 20 72 75 6e 20 6c 6f | phase t|o run lo|
|00003ec0| 74 73 20 66 61 73 74 65 | 72 20 6f 6e 0a 20 2a 20 |ts faste|r on. * |
|00003ed0| 73 69 6d 70 6c 65 20 63 | 61 73 65 73 2e 20 20 54 |simple c|ases. T|
|00003ee0| 68 65 79 20 61 72 65 3a | 0a 20 2a 0a 20 2a 20 72 |hey are:|. *. * r|
|00003ef0| 65 67 73 74 61 72 74 09 | 63 68 61 72 20 74 68 61 |egstart.|char tha|
|00003f00| 74 20 6d 75 73 74 20 62 | 65 67 69 6e 20 61 20 6d |t must b|egin a m|
|00003f10| 61 74 63 68 3b 20 27 5c | 30 27 20 69 66 20 6e 6f |atch; '\|0' if no|
|00003f20| 6e 65 20 6f 62 76 69 6f | 75 73 0a 20 2a 20 72 65 |ne obvio|us. * re|
|00003f30| 67 61 6e 63 68 09 69 73 | 20 74 68 65 20 6d 61 74 |ganch.is| the mat|
|00003f40| 63 68 20 61 6e 63 68 6f | 72 65 64 20 28 61 74 20 |ch ancho|red (at |
|00003f50| 62 65 67 69 6e 6e 69 6e | 67 2d 6f 66 2d 6c 69 6e |beginnin|g-of-lin|
|00003f60| 65 20 6f 6e 6c 79 29 3f | 0a 20 2a 20 72 65 67 6d |e only)?|. * regm|
|00003f70| 75 73 74 09 73 74 72 69 | 6e 67 20 28 70 6f 69 6e |ust.stri|ng (poin|
|00003f80| 74 65 72 20 69 6e 74 6f | 20 70 72 6f 67 72 61 6d |ter into| program|
|00003f90| 29 20 74 68 61 74 20 6d | 61 74 63 68 20 6d 75 73 |) that m|atch mus|
|00003fa0| 74 20 69 6e 63 6c 75 64 | 65 2c 20 6f 72 20 4e 55 |t includ|e, or NU|
|00003fb0| 4c 4c 0a 20 2a 20 72 65 | 67 6d 6c 65 6e 09 6c 65 |LL. * re|gmlen.le|
|00003fc0| 6e 67 74 68 20 6f 66 20 | 72 65 67 6d 75 73 74 20 |ngth of |regmust |
|00003fd0| 73 74 72 69 6e 67 0a 20 | 2a 0a 20 2a 20 52 65 67 |string. |*. * Reg|
|00003fe0| 73 74 61 72 74 20 61 6e | 64 20 72 65 67 61 6e 63 |start an|d reganc|
|00003ff0| 68 20 70 65 72 6d 69 74 | 20 76 65 72 79 20 66 61 |h permit| very fa|
|00004000| 73 74 20 64 65 63 69 73 | 69 6f 6e 73 20 6f 6e 20 |st decis|ions on |
|00004010| 73 75 69 74 61 62 6c 65 | 20 73 74 61 72 74 69 6e |suitable| startin|
|00004020| 67 20 70 6f 69 6e 74 73 | 0a 20 2a 20 66 6f 72 20 |g points|. * for |
|00004030| 61 20 6d 61 74 63 68 2c | 20 63 75 74 74 69 6e 67 |a match,| cutting|
|00004040| 20 64 6f 77 6e 20 74 68 | 65 20 77 6f 72 6b 20 61 | down th|e work a|
|00004050| 20 6c 6f 74 2e 20 20 52 | 65 67 6d 75 73 74 20 70 | lot. R|egmust p|
|00004060| 65 72 6d 69 74 73 20 66 | 61 73 74 20 72 65 6a 65 |ermits f|ast reje|
|00004070| 63 74 69 6f 6e 0a 20 2a | 20 6f 66 20 6c 69 6e 65 |ction. *| of line|
|00004080| 73 20 74 68 61 74 20 63 | 61 6e 6e 6f 74 20 70 6f |s that c|annot po|
|00004090| 73 73 69 62 6c 79 20 6d | 61 74 63 68 2e 20 20 54 |ssibly m|atch. T|
|000040a0| 68 65 20 72 65 67 6d 75 | 73 74 20 74 65 73 74 73 |he regmu|st tests|
|000040b0| 20 61 72 65 20 63 6f 73 | 74 6c 79 20 65 6e 6f 75 | are cos|tly enou|
|000040c0| 67 68 0a 20 2a 20 74 68 | 61 74 20 54 63 6c 52 65 |gh. * th|at TclRe|
|000040d0| 67 43 6f 6d 70 28 29 20 | 73 75 70 70 6c 69 65 73 |gComp() |supplies|
|000040e0| 20 61 20 72 65 67 6d 75 | 73 74 20 6f 6e 6c 79 20 | a regmu|st only |
|000040f0| 69 66 20 74 68 65 20 72 | 2e 65 2e 20 63 6f 6e 74 |if the r|.e. cont|
|00004100| 61 69 6e 73 20 73 6f 6d | 65 74 68 69 6e 67 0a 20 |ains som|ething. |
|00004110| 2a 20 70 6f 74 65 6e 74 | 69 61 6c 6c 79 20 65 78 |* potent|ially ex|
|00004120| 70 65 6e 73 69 76 65 20 | 28 61 74 20 70 72 65 73 |pensive |(at pres|
|00004130| 65 6e 74 2c 20 74 68 65 | 20 6f 6e 6c 79 20 73 75 |ent, the| only su|
|00004140| 63 68 20 74 68 69 6e 67 | 20 64 65 74 65 63 74 65 |ch thing| detecte|
|00004150| 64 20 69 73 20 2a 20 6f | 72 20 2b 0a 20 2a 20 61 |d is * o|r +. * a|
|00004160| 74 20 74 68 65 20 73 74 | 61 72 74 20 6f 66 20 74 |t the st|art of t|
|00004170| 68 65 20 72 2e 65 2e 2c | 20 77 68 69 63 68 20 63 |he r.e.,| which c|
|00004180| 61 6e 20 69 6e 76 6f 6c | 76 65 20 61 20 6c 6f 74 |an invol|ve a lot|
|00004190| 20 6f 66 20 62 61 63 6b | 75 70 29 2e 20 20 52 65 | of back|up). Re|
|000041a0| 67 6d 6c 65 6e 20 69 73 | 0a 20 2a 20 73 75 70 70 |gmlen is|. * supp|
|000041b0| 6c 69 65 64 20 62 65 63 | 61 75 73 65 20 74 68 65 |lied bec|ause the|
|000041c0| 20 74 65 73 74 20 69 6e | 20 54 63 6c 52 65 67 45 | test in| TclRegE|
|000041d0| 78 65 63 28 29 20 6e 65 | 65 64 73 20 69 74 20 61 |xec() ne|eds it a|
|000041e0| 6e 64 20 54 63 6c 52 65 | 67 43 6f 6d 70 28 29 20 |nd TclRe|gComp() |
|000041f0| 69 73 0a 20 2a 20 63 6f | 6d 70 75 74 69 6e 67 20 |is. * co|mputing |
|00004200| 69 74 20 61 6e 79 77 61 | 79 2e 0a 20 2a 2f 0a 0a |it anywa|y.. */..|
|00004210| 2f 2a 0a 20 2a 20 53 74 | 72 75 63 74 75 72 65 20 |/*. * St|ructure |
|00004220| 66 6f 72 20 72 65 67 65 | 78 70 20 22 70 72 6f 67 |for rege|xp "prog|
|00004230| 72 61 6d 22 2e 20 20 54 | 68 69 73 20 69 73 20 65 |ram". T|his is e|
|00004240| 73 73 65 6e 74 69 61 6c | 6c 79 20 61 20 6c 69 6e |ssential|ly a lin|
|00004250| 65 61 72 20 65 6e 63 6f | 64 69 6e 67 0a 20 2a 20 |ear enco|ding. * |
|00004260| 6f 66 20 61 20 6e 6f 6e | 64 65 74 65 72 6d 69 6e |of a non|determin|
|00004270| 69 73 74 69 63 20 66 69 | 6e 69 74 65 2d 73 74 61 |istic fi|nite-sta|
|00004280| 74 65 20 6d 61 63 68 69 | 6e 65 20 28 61 6b 61 20 |te machi|ne (aka |
|00004290| 73 79 6e 74 61 78 20 63 | 68 61 72 74 73 20 6f 72 |syntax c|harts or|
|000042a0| 0a 20 2a 20 22 72 61 69 | 6c 72 6f 61 64 20 6e 6f |. * "rai|lroad no|
|000042b0| 72 6d 61 6c 20 66 6f 72 | 6d 22 20 69 6e 20 70 61 |rmal for|m" in pa|
|000042c0| 72 73 69 6e 67 20 74 65 | 63 68 6e 6f 6c 6f 67 79 |rsing te|chnology|
|000042d0| 29 2e 20 20 45 61 63 68 | 20 6e 6f 64 65 20 69 73 |). Each| node is|
|000042e0| 20 61 6e 20 6f 70 63 6f | 64 65 0a 20 2a 20 70 6c | an opco|de. * pl|
|000042f0| 75 73 20 61 20 22 6e 65 | 78 74 22 20 70 6f 69 6e |us a "ne|xt" poin|
|00004300| 74 65 72 2c 20 70 6f 73 | 73 69 62 6c 79 20 70 6c |ter, pos|sibly pl|
|00004310| 75 73 20 61 6e 20 6f 70 | 65 72 61 6e 64 2e 20 20 |us an op|erand. |
|00004320| 22 4e 65 78 74 22 20 70 | 6f 69 6e 74 65 72 73 20 |"Next" p|ointers |
|00004330| 6f 66 0a 20 2a 20 61 6c | 6c 20 6e 6f 64 65 73 20 |of. * al|l nodes |
|00004340| 65 78 63 65 70 74 20 42 | 52 41 4e 43 48 20 69 6d |except B|RANCH im|
|00004350| 70 6c 65 6d 65 6e 74 20 | 63 6f 6e 63 61 74 65 6e |plement |concaten|
|00004360| 61 74 69 6f 6e 3b 20 61 | 20 22 6e 65 78 74 22 20 |ation; a| "next" |
|00004370| 70 6f 69 6e 74 65 72 20 | 77 69 74 68 0a 20 2a 20 |pointer |with. * |
|00004380| 61 20 42 52 41 4e 43 48 | 20 6f 6e 20 62 6f 74 68 |a BRANCH| on both|
|00004390| 20 65 6e 64 73 20 6f 66 | 20 69 74 20 69 73 20 63 | ends of| it is c|
|000043a0| 6f 6e 6e 65 63 74 69 6e | 67 20 74 77 6f 20 61 6c |onnectin|g two al|
|000043b0| 74 65 72 6e 61 74 69 76 | 65 73 2e 20 20 28 48 65 |ternativ|es. (He|
|000043c0| 72 65 20 77 65 0a 20 2a | 20 68 61 76 65 20 6f 6e |re we. *| have on|
|000043d0| 65 20 6f 66 20 74 68 65 | 20 73 75 62 74 6c 65 20 |e of the| subtle |
|000043e0| 73 79 6e 74 61 78 20 64 | 65 70 65 6e 64 65 6e 63 |syntax d|ependenc|
|000043f0| 69 65 73 3a 20 20 61 6e | 20 69 6e 64 69 76 69 64 |ies: an| individ|
|00004400| 75 61 6c 20 42 52 41 4e | 43 48 20 28 61 73 0a 20 |ual BRAN|CH (as. |
|00004410| 2a 20 6f 70 70 6f 73 65 | 64 20 74 6f 20 61 20 63 |* oppose|d to a c|
|00004420| 6f 6c 6c 65 63 74 69 6f | 6e 20 6f 66 20 74 68 65 |ollectio|n of the|
|00004430| 6d 29 20 69 73 20 6e 65 | 76 65 72 20 63 6f 6e 63 |m) is ne|ver conc|
|00004440| 61 74 65 6e 61 74 65 64 | 20 77 69 74 68 20 61 6e |atenated| with an|
|00004450| 79 74 68 69 6e 67 0a 20 | 2a 20 62 65 63 61 75 73 |ything. |* becaus|
|00004460| 65 20 6f 66 20 6f 70 65 | 72 61 74 6f 72 20 70 72 |e of ope|rator pr|
|00004470| 65 63 65 64 65 6e 63 65 | 2e 29 20 20 54 68 65 20 |ecedence|.) The |
|00004480| 6f 70 65 72 61 6e 64 20 | 6f 66 20 73 6f 6d 65 20 |operand |of some |
|00004490| 74 79 70 65 73 20 6f 66 | 20 6e 6f 64 65 20 69 73 |types of| node is|
|000044a0| 0a 20 2a 20 61 20 6c 69 | 74 65 72 61 6c 20 73 74 |. * a li|teral st|
|000044b0| 72 69 6e 67 3b 20 66 6f | 72 20 6f 74 68 65 72 73 |ring; fo|r others|
|000044c0| 2c 20 69 74 20 69 73 20 | 61 20 6e 6f 64 65 20 6c |, it is |a node l|
|000044d0| 65 61 64 69 6e 67 20 69 | 6e 74 6f 20 61 20 73 75 |eading i|nto a su|
|000044e0| 62 2d 46 53 4d 2e 20 20 | 49 6e 0a 20 2a 20 70 61 |b-FSM. |In. * pa|
|000044f0| 72 74 69 63 75 6c 61 72 | 2c 20 74 68 65 20 6f 70 |rticular|, the op|
|00004500| 65 72 61 6e 64 20 6f 66 | 20 61 20 42 52 41 4e 43 |erand of| a BRANC|
|00004510| 48 20 6e 6f 64 65 20 69 | 73 20 74 68 65 20 66 69 |H node i|s the fi|
|00004520| 72 73 74 20 6e 6f 64 65 | 20 6f 66 20 74 68 65 20 |rst node| of the |
|00004530| 62 72 61 6e 63 68 2e 0a | 20 2a 20 28 4e 42 20 74 |branch..| * (NB t|
|00004540| 68 69 73 20 69 73 20 2a | 6e 6f 74 2a 20 61 20 74 |his is *|not* a t|
|00004550| 72 65 65 20 73 74 72 75 | 63 74 75 72 65 3a 20 20 |ree stru|cture: |
|00004560| 74 68 65 20 74 61 69 6c | 20 6f 66 20 74 68 65 20 |the tail| of the |
|00004570| 62 72 61 6e 63 68 20 63 | 6f 6e 6e 65 63 74 73 0a |branch c|onnects.|
|00004580| 20 2a 20 74 6f 20 74 68 | 65 20 74 68 69 6e 67 20 | * to th|e thing |
|00004590| 66 6f 6c 6c 6f 77 69 6e | 67 20 74 68 65 20 73 65 |followin|g the se|
|000045a0| 74 20 6f 66 20 42 52 41 | 4e 43 48 65 73 2e 29 20 |t of BRA|NCHes.) |
|000045b0| 20 54 68 65 20 6f 70 63 | 6f 64 65 73 20 61 72 65 | The opc|odes are|
|000045c0| 3a 0a 20 2a 2f 0a 0a 2f | 2a 20 64 65 66 69 6e 69 |:. */../|* defini|
|000045d0| 74 69 6f 6e 09 6e 75 6d | 62 65 72 09 6f 70 6e 64 |tion.num|ber.opnd|
|000045e0| 3f 09 6d 65 61 6e 69 6e | 67 20 2a 2f 0a 23 64 65 |?.meanin|g */.#de|
|000045f0| 66 69 6e 65 09 45 4e 44 | 09 30 09 2f 2a 20 6e 6f |fine.END|.0./* no|
|00004600| 09 45 6e 64 20 6f 66 20 | 70 72 6f 67 72 61 6d 2e |.End of |program.|
|00004610| 20 2a 2f 0a 23 64 65 66 | 69 6e 65 09 42 4f 4c 09 | */.#def|ine.BOL.|
|00004620| 31 09 2f 2a 20 6e 6f 09 | 4d 61 74 63 68 20 22 22 |1./* no.|Match ""|
|00004630| 20 61 74 20 62 65 67 69 | 6e 6e 69 6e 67 20 6f 66 | at begi|nning of|
|00004640| 20 6c 69 6e 65 2e 20 2a | 2f 0a 23 64 65 66 69 6e | line. *|/.#defin|
|00004650| 65 09 45 4f 4c 09 32 09 | 2f 2a 20 6e 6f 09 4d 61 |e.EOL.2.|/* no.Ma|
|00004660| 74 63 68 20 22 22 20 61 | 74 20 65 6e 64 20 6f 66 |tch "" a|t end of|
|00004670| 20 6c 69 6e 65 2e 20 2a | 2f 0a 23 64 65 66 69 6e | line. *|/.#defin|
|00004680| 65 09 41 4e 59 09 33 09 | 2f 2a 20 6e 6f 09 4d 61 |e.ANY.3.|/* no.Ma|
|00004690| 74 63 68 20 61 6e 79 20 | 6f 6e 65 20 63 68 61 72 |tch any |one char|
|000046a0| 61 63 74 65 72 2e 20 2a | 2f 0a 23 64 65 66 69 6e |acter. *|/.#defin|
|000046b0| 65 09 41 4e 59 4f 46 09 | 34 09 2f 2a 20 73 74 72 |e.ANYOF.|4./* str|
|000046c0| 09 4d 61 74 63 68 20 61 | 6e 79 20 63 68 61 72 61 |.Match a|ny chara|
|000046d0| 63 74 65 72 20 69 6e 20 | 74 68 69 73 20 73 74 72 |cter in |this str|
|000046e0| 69 6e 67 2e 20 2a 2f 0a | 23 64 65 66 69 6e 65 09 |ing. */.|#define.|
|000046f0| 41 4e 59 42 55 54 09 35 | 09 2f 2a 20 73 74 72 09 |ANYBUT.5|./* str.|
|00004700| 4d 61 74 63 68 20 61 6e | 79 20 63 68 61 72 61 63 |Match an|y charac|
|00004710| 74 65 72 20 6e 6f 74 20 | 69 6e 20 74 68 69 73 20 |ter not |in this |
|00004720| 73 74 72 69 6e 67 2e 20 | 2a 2f 0a 23 64 65 66 69 |string. |*/.#defi|
|00004730| 6e 65 09 42 52 41 4e 43 | 48 09 36 09 2f 2a 20 6e |ne.BRANC|H.6./* n|
|00004740| 6f 64 65 09 4d 61 74 63 | 68 20 74 68 69 73 20 61 |ode.Matc|h this a|
|00004750| 6c 74 65 72 6e 61 74 69 | 76 65 2c 20 6f 72 20 74 |lternati|ve, or t|
|00004760| 68 65 20 6e 65 78 74 2e | 2e 2e 20 2a 2f 0a 23 64 |he next.|.. */.#d|
|00004770| 65 66 69 6e 65 09 42 41 | 43 4b 09 37 09 2f 2a 20 |efine.BA|CK.7./* |
|00004780| 6e 6f 09 4d 61 74 63 68 | 20 22 22 2c 20 22 6e 65 |no.Match| "", "ne|
|00004790| 78 74 22 20 70 74 72 20 | 70 6f 69 6e 74 73 20 62 |xt" ptr |points b|
|000047a0| 61 63 6b 77 61 72 64 2e | 20 2a 2f 0a 23 64 65 66 |ackward.| */.#def|
|000047b0| 69 6e 65 09 45 58 41 43 | 54 4c 59 09 38 09 2f 2a |ine.EXAC|TLY.8./*|
|000047c0| 20 73 74 72 09 4d 61 74 | 63 68 20 74 68 69 73 20 | str.Mat|ch this |
|000047d0| 73 74 72 69 6e 67 2e 20 | 2a 2f 0a 23 64 65 66 69 |string. |*/.#defi|
|000047e0| 6e 65 09 4e 4f 54 48 49 | 4e 47 09 39 09 2f 2a 20 |ne.NOTHI|NG.9./* |
|000047f0| 6e 6f 09 4d 61 74 63 68 | 20 65 6d 70 74 79 20 73 |no.Match| empty s|
|00004800| 74 72 69 6e 67 2e 20 2a | 2f 0a 23 64 65 66 69 6e |tring. *|/.#defin|
|00004810| 65 09 53 54 41 52 09 31 | 30 09 2f 2a 20 6e 6f 64 |e.STAR.1|0./* nod|
|00004820| 65 09 4d 61 74 63 68 20 | 74 68 69 73 20 28 73 69 |e.Match |this (si|
|00004830| 6d 70 6c 65 29 20 74 68 | 69 6e 67 20 30 20 6f 72 |mple) th|ing 0 or|
|00004840| 20 6d 6f 72 65 20 74 69 | 6d 65 73 2e 20 2a 2f 0a | more ti|mes. */.|
|00004850| 23 64 65 66 69 6e 65 09 | 50 4c 55 53 09 31 31 09 |#define.|PLUS.11.|
|00004860| 2f 2a 20 6e 6f 64 65 09 | 4d 61 74 63 68 20 74 68 |/* node.|Match th|
|00004870| 69 73 20 28 73 69 6d 70 | 6c 65 29 20 74 68 69 6e |is (simp|le) thin|
|00004880| 67 20 31 20 6f 72 20 6d | 6f 72 65 20 74 69 6d 65 |g 1 or m|ore time|
|00004890| 73 2e 20 2a 2f 0a 23 64 | 65 66 69 6e 65 09 4f 50 |s. */.#d|efine.OP|
|000048a0| 45 4e 09 32 30 09 2f 2a | 20 6e 6f 09 4d 61 72 6b |EN.20./*| no.Mark|
|000048b0| 20 74 68 69 73 20 70 6f | 69 6e 74 20 69 6e 20 69 | this po|int in i|
|000048c0| 6e 70 75 74 20 61 73 20 | 73 74 61 72 74 20 6f 66 |nput as |start of|
|000048d0| 20 23 6e 2e 20 2a 2f 0a | 09 09 09 2f 2a 09 4f 50 | #n. */.|.../*.OP|
|000048e0| 45 4e 2b 31 20 69 73 20 | 6e 75 6d 62 65 72 20 31 |EN+1 is |number 1|
|000048f0| 2c 20 65 74 63 2e 20 2a | 2f 0a 23 64 65 66 69 6e |, etc. *|/.#defin|
|00004900| 65 09 43 4c 4f 53 45 09 | 33 30 09 2f 2a 20 6e 6f |e.CLOSE.|30./* no|
|00004910| 09 41 6e 61 6c 6f 67 6f | 75 73 20 74 6f 20 4f 50 |.Analogo|us to OP|
|00004920| 45 4e 2e 20 2a 2f 0a 0a | 2f 2a 0a 20 2a 20 4f 70 |EN. */..|/*. * Op|
|00004930| 63 6f 64 65 20 6e 6f 74 | 65 73 3a 0a 20 2a 0a 20 |code not|es:. *. |
|00004940| 2a 20 42 52 41 4e 43 48 | 09 54 68 65 20 73 65 74 |* BRANCH|.The set|
|00004950| 20 6f 66 20 62 72 61 6e | 63 68 65 73 20 63 6f 6e | of bran|ches con|
|00004960| 73 74 69 74 75 74 69 6e | 67 20 61 20 73 69 6e 67 |stitutin|g a sing|
|00004970| 6c 65 20 63 68 6f 69 63 | 65 20 61 72 65 20 68 6f |le choic|e are ho|
|00004980| 6f 6b 65 64 0a 20 2a 09 | 09 74 6f 67 65 74 68 65 |oked. *.|.togethe|
|00004990| 72 20 77 69 74 68 20 74 | 68 65 69 72 20 22 6e 65 |r with t|heir "ne|
|000049a0| 78 74 22 20 70 6f 69 6e | 74 65 72 73 2c 20 73 69 |xt" poin|ters, si|
|000049b0| 6e 63 65 20 70 72 65 63 | 65 64 65 6e 63 65 20 70 |nce prec|edence p|
|000049c0| 72 65 76 65 6e 74 73 0a | 20 2a 09 09 61 6e 79 74 |revents.| *..anyt|
|000049d0| 68 69 6e 67 20 62 65 69 | 6e 67 20 63 6f 6e 63 61 |hing bei|ng conca|
|000049e0| 74 65 6e 61 74 65 64 20 | 74 6f 20 61 6e 79 20 69 |tenated |to any i|
|000049f0| 6e 64 69 76 69 64 75 61 | 6c 20 62 72 61 6e 63 68 |ndividua|l branch|
|00004a00| 2e 20 20 54 68 65 0a 20 | 2a 09 09 22 6e 65 78 74 |. The. |*.."next|
|00004a10| 22 20 70 6f 69 6e 74 65 | 72 20 6f 66 20 74 68 65 |" pointe|r of the|
|00004a20| 20 6c 61 73 74 20 42 52 | 41 4e 43 48 20 69 6e 20 | last BR|ANCH in |
|00004a30| 61 20 63 68 6f 69 63 65 | 20 70 6f 69 6e 74 73 20 |a choice| points |
|00004a40| 74 6f 20 74 68 65 0a 20 | 2a 09 09 74 68 69 6e 67 |to the. |*..thing|
|00004a50| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 74 68 65 20 77 | followi|ng the w|
|00004a60| 68 6f 6c 65 20 63 68 6f | 69 63 65 2e 20 20 54 68 |hole cho|ice. Th|
|00004a70| 69 73 20 69 73 20 61 6c | 73 6f 20 77 68 65 72 65 |is is al|so where|
|00004a80| 20 74 68 65 0a 20 2a 09 | 09 66 69 6e 61 6c 20 22 | the. *.|.final "|
|00004a90| 6e 65 78 74 22 20 70 6f | 69 6e 74 65 72 20 6f 66 |next" po|inter of|
|00004aa0| 20 65 61 63 68 20 69 6e | 64 69 76 69 64 75 61 6c | each in|dividual|
|00004ab0| 20 62 72 61 6e 63 68 20 | 70 6f 69 6e 74 73 3b 20 | branch |points; |
|00004ac0| 65 61 63 68 0a 20 2a 09 | 09 62 72 61 6e 63 68 20 |each. *.|.branch |
|00004ad0| 73 74 61 72 74 73 20 77 | 69 74 68 20 74 68 65 20 |starts w|ith the |
|00004ae0| 6f 70 65 72 61 6e 64 20 | 6e 6f 64 65 20 6f 66 20 |operand |node of |
|00004af0| 61 20 42 52 41 4e 43 48 | 20 6e 6f 64 65 2e 0a 20 |a BRANCH| node.. |
|00004b00| 2a 0a 20 2a 20 42 41 43 | 4b 09 09 4e 6f 72 6d 61 |*. * BAC|K..Norma|
|00004b10| 6c 20 22 6e 65 78 74 22 | 20 70 6f 69 6e 74 65 72 |l "next"| pointer|
|00004b20| 73 20 61 6c 6c 20 69 6d | 70 6c 69 63 69 74 6c 79 |s all im|plicitly|
|00004b30| 20 70 6f 69 6e 74 20 66 | 6f 72 77 61 72 64 3b 20 | point f|orward; |
|00004b40| 42 41 43 4b 0a 20 2a 09 | 09 65 78 69 73 74 73 20 |BACK. *.|.exists |
|00004b50| 74 6f 20 6d 61 6b 65 20 | 6c 6f 6f 70 20 73 74 72 |to make |loop str|
|00004b60| 75 63 74 75 72 65 73 20 | 70 6f 73 73 69 62 6c 65 |uctures |possible|
|00004b70| 2e 0a 20 2a 0a 20 2a 20 | 53 54 41 52 2c 50 4c 55 |.. *. * |STAR,PLU|
|00004b80| 53 09 27 3f 27 2c 20 61 | 6e 64 20 63 6f 6d 70 6c |S.'?', a|nd compl|
|00004b90| 65 78 20 27 2a 27 20 61 | 6e 64 20 27 2b 27 2c 20 |ex '*' a|nd '+', |
|00004ba0| 61 72 65 20 69 6d 70 6c | 65 6d 65 6e 74 65 64 20 |are impl|emented |
|00004bb0| 61 73 20 63 69 72 63 75 | 6c 61 72 0a 20 2a 09 09 |as circu|lar. *..|
|00004bc0| 42 52 41 4e 43 48 20 73 | 74 72 75 63 74 75 72 65 |BRANCH s|tructure|
|00004bd0| 73 20 75 73 69 6e 67 20 | 42 41 43 4b 2e 20 20 53 |s using |BACK. S|
|00004be0| 69 6d 70 6c 65 20 63 61 | 73 65 73 20 28 6f 6e 65 |imple ca|ses (one|
|00004bf0| 20 63 68 61 72 61 63 74 | 65 72 0a 20 2a 09 09 70 | charact|er. *..p|
|00004c00| 65 72 20 6d 61 74 63 68 | 29 20 61 72 65 20 69 6d |er match|) are im|
|00004c10| 70 6c 65 6d 65 6e 74 65 | 64 20 77 69 74 68 20 53 |plemente|d with S|
|00004c20| 54 41 52 20 61 6e 64 20 | 50 4c 55 53 20 66 6f 72 |TAR and |PLUS for|
|00004c30| 20 73 70 65 65 64 0a 20 | 2a 09 09 61 6e 64 20 74 | speed. |*..and t|
|00004c40| 6f 20 6d 69 6e 69 6d 69 | 7a 65 20 72 65 63 75 72 |o minimi|ze recur|
|00004c50| 73 69 76 65 20 70 6c 75 | 6e 67 65 73 2e 0a 20 2a |sive plu|nges.. *|
|00004c60| 0a 20 2a 20 4f 50 45 4e | 2c 43 4c 4f 53 45 09 2e |. * OPEN|,CLOSE..|
|00004c70| 2e 2e 61 72 65 20 6e 75 | 6d 62 65 72 65 64 20 61 |..are nu|mbered a|
|00004c80| 74 20 63 6f 6d 70 69 6c | 65 20 74 69 6d 65 2e 0a |t compil|e time..|
|00004c90| 20 2a 2f 0a 0a 2f 2a 0a | 20 2a 20 41 20 6e 6f 64 | */../*.| * A nod|
|00004ca0| 65 20 69 73 20 6f 6e 65 | 20 63 68 61 72 20 6f 66 |e is one| char of|
|00004cb0| 20 6f 70 63 6f 64 65 20 | 66 6f 6c 6c 6f 77 65 64 | opcode |followed|
|00004cc0| 20 62 79 20 74 77 6f 20 | 63 68 61 72 73 20 6f 66 | by two |chars of|
|00004cd0| 20 22 6e 65 78 74 22 20 | 70 6f 69 6e 74 65 72 2e | "next" |pointer.|
|00004ce0| 0a 20 2a 20 22 4e 65 78 | 74 22 20 70 6f 69 6e 74 |. * "Nex|t" point|
|00004cf0| 65 72 73 20 61 72 65 20 | 73 74 6f 72 65 64 20 61 |ers are |stored a|
|00004d00| 73 20 74 77 6f 20 38 2d | 62 69 74 20 70 69 65 63 |s two 8-|bit piec|
|00004d10| 65 73 2c 20 68 69 67 68 | 20 6f 72 64 65 72 20 66 |es, high| order f|
|00004d20| 69 72 73 74 2e 20 20 54 | 68 65 0a 20 2a 20 76 61 |irst. T|he. * va|
|00004d30| 6c 75 65 20 69 73 20 61 | 20 70 6f 73 69 74 69 76 |lue is a| positiv|
|00004d40| 65 20 6f 66 66 73 65 74 | 20 66 72 6f 6d 20 74 68 |e offset| from th|
|00004d50| 65 20 6f 70 63 6f 64 65 | 20 6f 66 20 74 68 65 20 |e opcode| of the |
|00004d60| 6e 6f 64 65 20 63 6f 6e | 74 61 69 6e 69 6e 67 20 |node con|taining |
|00004d70| 69 74 2e 0a 20 2a 20 41 | 6e 20 6f 70 65 72 61 6e |it.. * A|n operan|
|00004d80| 64 2c 20 69 66 20 61 6e | 79 2c 20 73 69 6d 70 6c |d, if an|y, simpl|
|00004d90| 79 20 66 6f 6c 6c 6f 77 | 73 20 74 68 65 20 6e 6f |y follow|s the no|
|00004da0| 64 65 2e 20 20 28 4e 6f | 74 65 20 74 68 61 74 20 |de. (No|te that |
|00004db0| 6d 75 63 68 20 6f 66 20 | 74 68 65 0a 20 2a 20 63 |much of |the. * c|
|00004dc0| 6f 64 65 20 67 65 6e 65 | 72 61 74 69 6f 6e 20 6b |ode gene|ration k|
|00004dd0| 6e 6f 77 73 20 61 62 6f | 75 74 20 74 68 69 73 20 |nows abo|ut this |
|00004de0| 69 6d 70 6c 69 63 69 74 | 20 72 65 6c 61 74 69 6f |implicit| relatio|
|00004df0| 6e 73 68 69 70 2e 29 0a | 20 2a 0a 20 2a 20 55 73 |nship.).| *. * Us|
|00004e00| 69 6e 67 20 74 77 6f 20 | 62 79 74 65 73 20 66 6f |ing two |bytes fo|
|00004e10| 72 20 74 68 65 20 22 6e | 65 78 74 22 20 70 6f 69 |r the "n|ext" poi|
|00004e20| 6e 74 65 72 20 69 73 20 | 76 61 73 74 20 6f 76 65 |nter is |vast ove|
|00004e30| 72 6b 69 6c 6c 20 66 6f | 72 20 6d 6f 73 74 20 74 |rkill fo|r most t|
|00004e40| 68 69 6e 67 73 2c 0a 20 | 2a 20 62 75 74 20 61 6c |hings,. |* but al|
|00004e50| 6c 6f 77 73 20 70 61 74 | 74 65 72 6e 73 20 74 6f |lows pat|terns to|
|00004e60| 20 67 65 74 20 62 69 67 | 20 77 69 74 68 6f 75 74 | get big| without|
|00004e70| 20 64 69 73 61 73 74 65 | 72 73 2e 0a 20 2a 2f 0a | disaste|rs.. */.|
|00004e80| 23 64 65 66 69 6e 65 09 | 4f 50 28 70 29 09 28 2a |#define.|OP(p).(*|
|00004e90| 28 70 29 29 0a 23 64 65 | 66 69 6e 65 09 4e 45 58 |(p)).#de|fine.NEX|
|00004ea0| 54 28 70 29 09 28 28 28 | 2a 28 28 70 29 2b 31 29 |T(p).(((|*((p)+1)|
|00004eb0| 26 30 33 37 37 29 3c 3c | 38 29 20 2b 20 28 2a 28 |&0377)<<|8) + (*(|
|00004ec0| 28 70 29 2b 32 29 26 30 | 33 37 37 29 29 0a 23 64 |(p)+2)&0|377)).#d|
|00004ed0| 65 66 69 6e 65 09 4f 50 | 45 52 41 4e 44 28 70 29 |efine.OP|ERAND(p)|
|00004ee0| 09 28 28 70 29 20 2b 20 | 33 29 0a 0a 2f 2a 0a 20 |.((p) + |3)../*. |
|00004ef0| 2a 20 53 65 65 20 72 65 | 67 6d 61 67 69 63 2e 68 |* See re|gmagic.h|
|00004f00| 20 66 6f 72 20 6f 6e 65 | 20 66 75 72 74 68 65 72 | for one| further|
|00004f10| 20 64 65 74 61 69 6c 20 | 6f 66 20 70 72 6f 67 72 | detail |of progr|
|00004f20| 61 6d 20 73 74 72 75 63 | 74 75 72 65 2e 0a 20 2a |am struc|ture.. *|
|00004f30| 2f 0a 0a 0a 2f 2a 0a 20 | 2a 20 55 74 69 6c 69 74 |/.../*. |* Utilit|
|00004f40| 79 20 64 65 66 69 6e 69 | 74 69 6f 6e 73 2e 0a 20 |y defini|tions.. |
|00004f50| 2a 2f 0a 23 69 66 6e 64 | 65 66 20 43 48 41 52 42 |*/.#ifnd|ef CHARB|
|00004f60| 49 54 53 0a 23 64 65 66 | 69 6e 65 09 55 43 48 41 |ITS.#def|ine.UCHA|
|00004f70| 52 41 54 28 70 29 09 28 | 28 69 6e 74 29 2a 28 75 |RAT(p).(|(int)*(u|
|00004f80| 6e 73 69 67 6e 65 64 20 | 63 68 61 72 20 2a 29 28 |nsigned |char *)(|
|00004f90| 70 29 29 0a 23 65 6c 73 | 65 0a 23 64 65 66 69 6e |p)).#els|e.#defin|
|00004fa0| 65 09 55 43 48 41 52 41 | 54 28 70 29 09 28 28 69 |e.UCHARA|T(p).((i|
|00004fb0| 6e 74 29 2a 28 70 29 26 | 43 48 41 52 42 49 54 53 |nt)*(p)&|CHARBITS|
|00004fc0| 29 0a 23 65 6e 64 69 66 | 0a 0a 23 64 65 66 69 6e |).#endif|..#defin|
|00004fd0| 65 09 46 41 49 4c 28 6d | 29 09 7b 20 54 63 6c 52 |e.FAIL(m|).{ TclR|
|00004fe0| 65 67 45 72 72 6f 72 28 | 6d 29 3b 20 72 65 74 75 |egError(|m); retu|
|00004ff0| 72 6e 28 4e 55 4c 4c 29 | 3b 20 7d 0a 23 64 65 66 |rn(NULL)|; }.#def|
|00005000| 69 6e 65 09 49 53 4d 55 | 4c 54 28 63 29 09 28 28 |ine.ISMU|LT(c).((|
|00005010| 63 29 20 3d 3d 20 27 2a | 27 20 7c 7c 20 28 63 29 |c) == '*|' || (c)|
|00005020| 20 3d 3d 20 27 2b 27 20 | 7c 7c 20 28 63 29 20 3d | == '+' ||| (c) =|
|00005030| 3d 20 27 3f 27 29 0a 23 | 64 65 66 69 6e 65 09 4d |= '?').#|define.M|
|00005040| 45 54 41 09 22 5e 24 2e | 5b 28 29 7c 3f 2b 2a 5c |ETA."^$.|[()|?+*\|
|00005050| 5c 22 0a 0a 2f 2a 0a 20 | 2a 20 46 6c 61 67 73 20 |\"../*. |* Flags |
|00005060| 74 6f 20 62 65 20 70 61 | 73 73 65 64 20 75 70 20 |to be pa|ssed up |
|00005070| 61 6e 64 20 64 6f 77 6e | 2e 0a 20 2a 2f 0a 23 64 |and down|.. */.#d|
|00005080| 65 66 69 6e 65 09 48 41 | 53 57 49 44 54 48 09 30 |efine.HA|SWIDTH.0|
|00005090| 31 09 2f 2a 20 4b 6e 6f | 77 6e 20 6e 65 76 65 72 |1./* Kno|wn never|
|000050a0| 20 74 6f 20 6d 61 74 63 | 68 20 6e 75 6c 6c 20 73 | to matc|h null s|
|000050b0| 74 72 69 6e 67 2e 20 2a | 2f 0a 23 64 65 66 69 6e |tring. *|/.#defin|
|000050c0| 65 09 53 49 4d 50 4c 45 | 09 09 30 32 09 2f 2a 20 |e.SIMPLE|..02./* |
|000050d0| 53 69 6d 70 6c 65 20 65 | 6e 6f 75 67 68 20 74 6f |Simple e|nough to|
|000050e0| 20 62 65 20 53 54 41 52 | 2f 50 4c 55 53 20 6f 70 | be STAR|/PLUS op|
|000050f0| 65 72 61 6e 64 2e 20 2a | 2f 0a 23 64 65 66 69 6e |erand. *|/.#defin|
|00005100| 65 09 53 50 53 54 41 52 | 54 09 09 30 34 09 2f 2a |e.SPSTAR|T..04./*|
|00005110| 20 53 74 61 72 74 73 20 | 77 69 74 68 20 2a 20 6f | Starts |with * o|
|00005120| 72 20 2b 2e 20 2a 2f 0a | 23 64 65 66 69 6e 65 09 |r +. */.|#define.|
|00005130| 57 4f 52 53 54 09 09 30 | 09 2f 2a 20 57 6f 72 73 |WORST..0|./* Wors|
|00005140| 74 20 63 61 73 65 2e 20 | 2a 2f 0a 0a 2f 2a 0a 20 |t case. |*/../*. |
|00005150| 2a 20 47 6c 6f 62 61 6c | 20 77 6f 72 6b 20 76 61 |* Global| work va|
|00005160| 72 69 61 62 6c 65 73 20 | 66 6f 72 20 54 63 6c 52 |riables |for TclR|
|00005170| 65 67 43 6f 6d 70 28 29 | 2e 0a 20 2a 2f 0a 73 74 |egComp()|.. */.st|
|00005180| 72 75 63 74 20 72 65 67 | 63 6f 6d 70 5f 73 74 61 |ruct reg|comp_sta|
|00005190| 74 65 20 20 7b 0a 20 20 | 20 20 63 68 61 72 20 2a |te {. | char *|
|000051a0| 72 65 67 70 61 72 73 65 | 3b 09 09 2f 2a 20 49 6e |regparse|;../* In|
|000051b0| 70 75 74 2d 73 63 61 6e | 20 70 6f 69 6e 74 65 72 |put-scan| pointer|
|000051c0| 2e 20 2a 2f 0a 20 20 20 | 20 69 6e 74 20 72 65 67 |. */. | int reg|
|000051d0| 6e 70 61 72 3b 09 09 2f | 2a 20 28 29 20 63 6f 75 |npar;../|* () cou|
|000051e0| 6e 74 2e 20 2a 2f 0a 20 | 20 20 20 63 68 61 72 20 |nt. */. | char |
|000051f0| 2a 72 65 67 63 6f 64 65 | 3b 09 09 2f 2a 20 43 6f |*regcode|;../* Co|
|00005200| 64 65 2d 65 6d 69 74 20 | 70 6f 69 6e 74 65 72 3b |de-emit |pointer;|
|00005210| 20 26 72 65 67 64 75 6d | 6d 79 20 3d 20 64 6f 6e | &regdum|my = don|
|00005220| 27 74 2e 20 2a 2f 0a 20 | 20 20 20 6c 6f 6e 67 20 |'t. */. | long |
|00005230| 72 65 67 73 69 7a 65 3b | 09 09 2f 2a 20 43 6f 64 |regsize;|../* Cod|
|00005240| 65 20 73 69 7a 65 2e 20 | 2a 2f 0a 7d 3b 0a 0a 73 |e size. |*/.};..s|
|00005250| 74 61 74 69 63 20 63 68 | 61 72 20 72 65 67 64 75 |tatic ch|ar regdu|
|00005260| 6d 6d 79 3b 0a 0a 2f 2a | 0a 20 2a 20 54 68 65 20 |mmy;../*|. * The |
|00005270| 66 69 72 73 74 20 62 79 | 74 65 20 6f 66 20 74 68 |first by|te of th|
|00005280| 65 20 72 65 67 65 78 70 | 20 69 6e 74 65 72 6e 61 |e regexp| interna|
|00005290| 6c 20 22 70 72 6f 67 72 | 61 6d 22 20 69 73 20 61 |l "progr|am" is a|
|000052a0| 63 74 75 61 6c 6c 79 20 | 74 68 69 73 20 6d 61 67 |ctually |this mag|
|000052b0| 69 63 0a 20 2a 20 6e 75 | 6d 62 65 72 3b 20 74 68 |ic. * nu|mber; th|
|000052c0| 65 20 73 74 61 72 74 20 | 6e 6f 64 65 20 62 65 67 |e start |node beg|
|000052d0| 69 6e 73 20 69 6e 20 74 | 68 65 20 73 65 63 6f 6e |ins in t|he secon|
|000052e0| 64 20 62 79 74 65 2e 0a | 20 2a 2f 0a 23 64 65 66 |d byte..| */.#def|
|000052f0| 69 6e 65 09 4d 41 47 49 | 43 09 30 32 33 34 0a 0a |ine.MAGI|C.0234..|
|00005300| 0a 2f 2a 0a 20 2a 20 46 | 6f 72 77 61 72 64 20 64 |./*. * F|orward d|
|00005310| 65 63 6c 61 72 61 74 69 | 6f 6e 73 20 66 6f 72 20 |eclarati|ons for |
|00005320| 54 63 6c 52 65 67 43 6f | 6d 70 28 29 27 73 20 66 |TclRegCo|mp()'s f|
|00005330| 72 69 65 6e 64 73 2e 0a | 20 2a 2f 0a 23 69 66 6e |riends..| */.#ifn|
|00005340| 64 65 66 20 53 54 41 54 | 49 43 0a 23 64 65 66 69 |def STAT|IC.#defi|
|00005350| 6e 65 09 53 54 41 54 49 | 43 09 73 74 61 74 69 63 |ne.STATI|C.static|
|00005360| 0a 23 65 6e 64 69 66 0a | 53 54 41 54 49 43 20 63 |.#endif.|STATIC c|
|00005370| 68 61 72 20 2a 72 65 67 | 28 29 3b 0a 53 54 41 54 |har *reg|();.STAT|
|00005380| 49 43 20 63 68 61 72 20 | 2a 72 65 67 62 72 61 6e |IC char |*regbran|
|00005390| 63 68 28 29 3b 0a 53 54 | 41 54 49 43 20 63 68 61 |ch();.ST|ATIC cha|
|000053a0| 72 20 2a 72 65 67 70 69 | 65 63 65 28 29 3b 0a 53 |r *regpi|ece();.S|
|000053b0| 54 41 54 49 43 20 63 68 | 61 72 20 2a 72 65 67 61 |TATIC ch|ar *rega|
|000053c0| 74 6f 6d 28 29 3b 0a 53 | 54 41 54 49 43 20 63 68 |tom();.S|TATIC ch|
|000053d0| 61 72 20 2a 72 65 67 6e | 6f 64 65 28 29 3b 0a 53 |ar *regn|ode();.S|
|000053e0| 54 41 54 49 43 20 63 68 | 61 72 20 2a 72 65 67 6e |TATIC ch|ar *regn|
|000053f0| 65 78 74 28 29 3b 0a 53 | 54 41 54 49 43 20 76 6f |ext();.S|TATIC vo|
|00005400| 69 64 20 72 65 67 63 28 | 29 3b 0a 53 54 41 54 49 |id regc(|);.STATI|
|00005410| 43 20 76 6f 69 64 20 72 | 65 67 69 6e 73 65 72 74 |C void r|eginsert|
|00005420| 28 29 3b 0a 53 54 41 54 | 49 43 20 76 6f 69 64 20 |();.STAT|IC void |
|00005430| 72 65 67 74 61 69 6c 28 | 29 3b 0a 53 54 41 54 49 |regtail(|);.STATI|
|00005440| 43 20 76 6f 69 64 20 72 | 65 67 6f 70 74 61 69 6c |C void r|egoptail|
|00005450| 28 29 3b 0a 23 69 66 64 | 65 66 20 53 54 52 43 53 |();.#ifd|ef STRCS|
|00005460| 50 4e 0a 53 54 41 54 49 | 43 20 69 6e 74 20 73 74 |PN.STATI|C int st|
|00005470| 72 63 73 70 6e 28 29 3b | 0a 23 65 6e 64 69 66 0a |rcspn();|.#endif.|
|00005480| 0a 2f 2a 0a 20 2d 20 54 | 63 6c 52 65 67 43 6f 6d |./*. - T|clRegCom|
|00005490| 70 20 2d 20 63 6f 6d 70 | 69 6c 65 20 61 20 72 65 |p - comp|ile a re|
|000054a0| 67 75 6c 61 72 20 65 78 | 70 72 65 73 73 69 6f 6e |gular ex|pression|
|000054b0| 20 69 6e 74 6f 20 69 6e | 74 65 72 6e 61 6c 20 63 | into in|ternal c|
|000054c0| 6f 64 65 0a 20 2a 0a 20 | 2a 20 57 65 20 63 61 6e |ode. *. |* We can|
|000054d0| 27 74 20 61 6c 6c 6f 63 | 61 74 65 20 73 70 61 63 |'t alloc|ate spac|
|000054e0| 65 20 75 6e 74 69 6c 20 | 77 65 20 6b 6e 6f 77 20 |e until |we know |
|000054f0| 68 6f 77 20 62 69 67 20 | 74 68 65 20 63 6f 6d 70 |how big |the comp|
|00005500| 69 6c 65 64 20 66 6f 72 | 6d 20 77 69 6c 6c 20 62 |iled for|m will b|
|00005510| 65 2c 0a 20 2a 20 62 75 | 74 20 77 65 20 63 61 6e |e,. * bu|t we can|
|00005520| 27 74 20 63 6f 6d 70 69 | 6c 65 20 69 74 20 28 61 |'t compi|le it (a|
|00005530| 6e 64 20 74 68 75 73 20 | 6b 6e 6f 77 20 68 6f 77 |nd thus |know how|
|00005540| 20 62 69 67 20 69 74 20 | 69 73 29 20 75 6e 74 69 | big it |is) unti|
|00005550| 6c 20 77 65 27 76 65 20 | 67 6f 74 20 61 0a 20 2a |l we've |got a. *|
|00005560| 20 70 6c 61 63 65 20 74 | 6f 20 70 75 74 20 74 68 | place t|o put th|
|00005570| 65 20 63 6f 64 65 2e 20 | 20 53 6f 20 77 65 20 63 |e code. | So we c|
|00005580| 68 65 61 74 3a 20 20 77 | 65 20 63 6f 6d 70 69 6c |heat: w|e compil|
|00005590| 65 20 69 74 20 74 77 69 | 63 65 2c 20 6f 6e 63 65 |e it twi|ce, once|
|000055a0| 20 77 69 74 68 20 63 6f | 64 65 0a 20 2a 20 67 65 | with co|de. * ge|
|000055b0| 6e 65 72 61 74 69 6f 6e | 20 74 75 72 6e 65 64 20 |neration| turned |
|000055c0| 6f 66 66 20 61 6e 64 20 | 73 69 7a 65 20 63 6f 75 |off and |size cou|
|000055d0| 6e 74 69 6e 67 20 74 75 | 72 6e 65 64 20 6f 6e 2c |nting tu|rned on,|
|000055e0| 20 61 6e 64 20 6f 6e 63 | 65 20 22 66 6f 72 20 72 | and onc|e "for r|
|000055f0| 65 61 6c 22 2e 0a 20 2a | 20 54 68 69 73 20 61 6c |eal".. *| This al|
|00005600| 73 6f 20 6d 65 61 6e 73 | 20 74 68 61 74 20 77 65 |so means| that we|
|00005610| 20 64 6f 6e 27 74 20 61 | 6c 6c 6f 63 61 74 65 20 | don't a|llocate |
|00005620| 73 70 61 63 65 20 75 6e | 74 69 6c 20 77 65 20 61 |space un|til we a|
|00005630| 72 65 20 73 75 72 65 20 | 74 68 61 74 20 74 68 65 |re sure |that the|
|00005640| 0a 20 2a 20 74 68 69 6e | 67 20 72 65 61 6c 6c 79 |. * thin|g really|
|00005650| 20 77 69 6c 6c 20 63 6f | 6d 70 69 6c 65 20 73 75 | will co|mpile su|
|00005660| 63 63 65 73 73 66 75 6c | 6c 79 2c 20 61 6e 64 20 |ccessful|ly, and |
|00005670| 77 65 20 6e 65 76 65 72 | 20 68 61 76 65 20 74 6f |we never| have to|
|00005680| 20 6d 6f 76 65 20 74 68 | 65 0a 20 2a 20 63 6f 64 | move th|e. * cod|
|00005690| 65 20 61 6e 64 20 74 68 | 75 73 20 69 6e 76 61 6c |e and th|us inval|
|000056a0| 69 64 61 74 65 20 70 6f | 69 6e 74 65 72 73 20 69 |idate po|inters i|
|000056b0| 6e 74 6f 20 69 74 2e 20 | 20 28 4e 6f 74 65 20 74 |nto it. | (Note t|
|000056c0| 68 61 74 20 69 74 20 68 | 61 73 20 74 6f 20 62 65 |hat it h|as to be|
|000056d0| 20 69 6e 0a 20 2a 20 6f | 6e 65 20 70 69 65 63 65 | in. * o|ne piece|
|000056e0| 20 62 65 63 61 75 73 65 | 20 66 72 65 65 28 29 20 | because| free() |
|000056f0| 6d 75 73 74 20 62 65 20 | 61 62 6c 65 20 74 6f 20 |must be |able to |
|00005700| 66 72 65 65 20 69 74 20 | 61 6c 6c 2e 29 0a 20 2a |free it |all.). *|
|00005710| 0a 20 2a 20 42 65 77 61 | 72 65 20 74 68 61 74 20 |. * Bewa|re that |
|00005720| 74 68 65 20 6f 70 74 69 | 6d 69 7a 61 74 69 6f 6e |the opti|mization|
|00005730| 2d 70 72 65 70 61 72 61 | 74 69 6f 6e 20 63 6f 64 |-prepara|tion cod|
|00005740| 65 20 69 6e 20 68 65 72 | 65 20 6b 6e 6f 77 73 20 |e in her|e knows |
|00005750| 61 62 6f 75 74 20 73 6f | 6d 65 0a 20 2a 20 6f 66 |about so|me. * of|
|00005760| 20 74 68 65 20 73 74 72 | 75 63 74 75 72 65 20 6f | the str|ucture o|
|00005770| 66 20 74 68 65 20 63 6f | 6d 70 69 6c 65 64 20 72 |f the co|mpiled r|
|00005780| 65 67 65 78 70 2e 0a 20 | 2a 2f 0a 72 65 67 65 78 |egexp.. |*/.regex|
|00005790| 70 20 2a 0a 54 63 6c 52 | 65 67 43 6f 6d 70 28 65 |p *.TclR|egComp(e|
|000057a0| 78 70 29 0a 63 68 61 72 | 20 2a 65 78 70 3b 0a 7b |xp).char| *exp;.{|
|000057b0| 0a 09 72 65 67 69 73 74 | 65 72 20 72 65 67 65 78 |..regist|er regex|
|000057c0| 70 20 2a 72 3b 0a 09 72 | 65 67 69 73 74 65 72 20 |p *r;..r|egister |
|000057d0| 63 68 61 72 20 2a 73 63 | 61 6e 3b 0a 09 72 65 67 |char *sc|an;..reg|
|000057e0| 69 73 74 65 72 20 63 68 | 61 72 20 2a 6c 6f 6e 67 |ister ch|ar *long|
|000057f0| 65 73 74 3b 0a 09 72 65 | 67 69 73 74 65 72 20 69 |est;..re|gister i|
|00005800| 6e 74 20 6c 65 6e 3b 0a | 09 69 6e 74 20 66 6c 61 |nt len;.|.int fla|
|00005810| 67 73 3b 0a 09 73 74 72 | 75 63 74 20 72 65 67 63 |gs;..str|uct regc|
|00005820| 6f 6d 70 5f 73 74 61 74 | 65 20 73 74 61 74 65 3b |omp_stat|e state;|
|00005830| 0a 09 73 74 72 75 63 74 | 20 72 65 67 63 6f 6d 70 |..struct| regcomp|
|00005840| 5f 73 74 61 74 65 20 2a | 72 63 73 74 61 74 65 3d |_state *|rcstate=|
|00005850| 20 26 73 74 61 74 65 3b | 0a 0a 09 69 66 20 28 65 | &state;|...if (e|
|00005860| 78 70 20 3d 3d 20 4e 55 | 4c 4c 29 0a 09 09 46 41 |xp == NU|LL)...FA|
|00005870| 49 4c 28 22 4e 55 4c 4c | 20 61 72 67 75 6d 65 6e |IL("NULL| argumen|
|00005880| 74 22 29 3b 0a 0a 09 2f | 2a 20 46 69 72 73 74 20 |t");.../|* First |
|00005890| 70 61 73 73 3a 20 64 65 | 74 65 72 6d 69 6e 65 20 |pass: de|termine |
|000058a0| 73 69 7a 65 2c 20 6c 65 | 67 61 6c 69 74 79 2e 20 |size, le|gality. |
|000058b0| 2a 2f 0a 09 72 63 73 74 | 61 74 65 2d 3e 72 65 67 |*/..rcst|ate->reg|
|000058c0| 70 61 72 73 65 20 3d 20 | 65 78 70 3b 0a 09 72 63 |parse = |exp;..rc|
|000058d0| 73 74 61 74 65 2d 3e 72 | 65 67 6e 70 61 72 20 3d |state->r|egnpar =|
|000058e0| 20 31 3b 0a 09 72 63 73 | 74 61 74 65 2d 3e 72 65 | 1;..rcs|tate->re|
|000058f0| 67 73 69 7a 65 20 3d 20 | 30 4c 3b 0a 09 72 63 73 |gsize = |0L;..rcs|
|00005900| 74 61 74 65 2d 3e 72 65 | 67 63 6f 64 65 20 3d 20 |tate->re|gcode = |
|00005910| 26 72 65 67 64 75 6d 6d | 79 3b 0a 09 72 65 67 63 |&regdumm|y;..regc|
|00005920| 28 4d 41 47 49 43 2c 20 | 72 63 73 74 61 74 65 29 |(MAGIC, |rcstate)|
|00005930| 3b 0a 09 69 66 20 28 72 | 65 67 28 30 2c 20 26 66 |;..if (r|eg(0, &f|
|00005940| 6c 61 67 73 2c 20 72 63 | 73 74 61 74 65 29 20 3d |lags, rc|state) =|
|00005950| 3d 20 4e 55 4c 4c 29 0a | 09 09 72 65 74 75 72 6e |= NULL).|..return|
|00005960| 28 4e 55 4c 4c 29 3b 0a | 0a 09 2f 2a 20 53 6d 61 |(NULL);.|../* Sma|
|00005970| 6c 6c 20 65 6e 6f 75 67 | 68 20 66 6f 72 20 70 6f |ll enoug|h for po|
|00005980| 69 6e 74 65 72 2d 73 74 | 6f 72 61 67 65 20 63 6f |inter-st|orage co|
|00005990| 6e 76 65 6e 74 69 6f 6e | 3f 20 2a 2f 0a 09 69 66 |nvention|? */..if|
|000059a0| 20 28 72 63 73 74 61 74 | 65 2d 3e 72 65 67 73 69 | (rcstat|e->regsi|
|000059b0| 7a 65 20 3e 3d 20 33 32 | 37 36 37 4c 29 09 09 2f |ze >= 32|767L)../|
|000059c0| 2a 20 50 72 6f 62 61 62 | 6c 79 20 63 6f 75 6c 64 |* Probab|ly could|
|000059d0| 20 62 65 20 36 35 35 33 | 35 4c 2e 20 2a 2f 0a 09 | be 6553|5L. */..|
|000059e0| 09 46 41 49 4c 28 22 72 | 65 67 65 78 70 20 74 6f |.FAIL("r|egexp to|
|000059f0| 6f 20 62 69 67 22 29 3b | 0a 0a 09 2f 2a 20 41 6c |o big");|.../* Al|
|00005a00| 6c 6f 63 61 74 65 20 73 | 70 61 63 65 2e 20 2a 2f |locate s|pace. */|
|00005a10| 0a 09 72 20 3d 20 28 72 | 65 67 65 78 70 20 2a 29 |..r = (r|egexp *)|
|00005a20| 63 6b 61 6c 6c 6f 63 28 | 73 69 7a 65 6f 66 28 72 |ckalloc(|sizeof(r|
|00005a30| 65 67 65 78 70 29 20 2b | 20 28 75 6e 73 69 67 6e |egexp) +| (unsign|
|00005a40| 65 64 29 72 63 73 74 61 | 74 65 2d 3e 72 65 67 73 |ed)rcsta|te->regs|
|00005a50| 69 7a 65 29 3b 0a 09 69 | 66 20 28 72 20 3d 3d 20 |ize);..i|f (r == |
|00005a60| 4e 55 4c 4c 29 0a 09 09 | 46 41 49 4c 28 22 6f 75 |NULL)...|FAIL("ou|
|00005a70| 74 20 6f 66 20 73 70 61 | 63 65 22 29 3b 0a 0a 09 |t of spa|ce");...|
|00005a80| 2f 2a 20 53 65 63 6f 6e | 64 20 70 61 73 73 3a 20 |/* Secon|d pass: |
|00005a90| 65 6d 69 74 20 63 6f 64 | 65 2e 20 2a 2f 0a 09 72 |emit cod|e. */..r|
|00005aa0| 63 73 74 61 74 65 2d 3e | 72 65 67 70 61 72 73 65 |cstate->|regparse|
|00005ab0| 20 3d 20 65 78 70 3b 0a | 09 72 63 73 74 61 74 65 | = exp;.|.rcstate|
|00005ac0| 2d 3e 72 65 67 6e 70 61 | 72 20 3d 20 31 3b 0a 09 |->regnpa|r = 1;..|
|00005ad0| 72 63 73 74 61 74 65 2d | 3e 72 65 67 63 6f 64 65 |rcstate-|>regcode|
|00005ae0| 20 3d 20 72 2d 3e 70 72 | 6f 67 72 61 6d 3b 0a 09 | = r->pr|ogram;..|
|00005af0| 72 65 67 63 28 4d 41 47 | 49 43 2c 20 72 63 73 74 |regc(MAG|IC, rcst|
|00005b00| 61 74 65 29 3b 0a 09 69 | 66 20 28 72 65 67 28 30 |ate);..i|f (reg(0|
|00005b10| 2c 20 26 66 6c 61 67 73 | 2c 20 72 63 73 74 61 74 |, &flags|, rcstat|
|00005b20| 65 29 20 3d 3d 20 4e 55 | 4c 4c 29 0a 09 09 72 65 |e) == NU|LL)...re|
|00005b30| 74 75 72 6e 28 4e 55 4c | 4c 29 3b 0a 0a 09 2f 2a |turn(NUL|L);.../*|
|00005b40| 20 44 69 67 20 6f 75 74 | 20 69 6e 66 6f 72 6d 61 | Dig out| informa|
|00005b50| 74 69 6f 6e 20 66 6f 72 | 20 6f 70 74 69 6d 69 7a |tion for| optimiz|
|00005b60| 61 74 69 6f 6e 73 2e 20 | 2a 2f 0a 09 72 2d 3e 72 |ations. |*/..r->r|
|00005b70| 65 67 73 74 61 72 74 20 | 3d 20 27 5c 30 27 3b 09 |egstart |= '\0';.|
|00005b80| 2f 2a 20 57 6f 72 73 74 | 2d 63 61 73 65 20 64 65 |/* Worst|-case de|
|00005b90| 66 61 75 6c 74 73 2e 20 | 2a 2f 0a 09 72 2d 3e 72 |faults. |*/..r->r|
|00005ba0| 65 67 61 6e 63 68 20 3d | 20 30 3b 0a 09 72 2d 3e |eganch =| 0;..r->|
|00005bb0| 72 65 67 6d 75 73 74 20 | 3d 20 4e 55 4c 4c 3b 0a |regmust |= NULL;.|
|00005bc0| 09 72 2d 3e 72 65 67 6d | 6c 65 6e 20 3d 20 30 3b |.r->regm|len = 0;|
|00005bd0| 0a 09 73 63 61 6e 20 3d | 20 72 2d 3e 70 72 6f 67 |..scan =| r->prog|
|00005be0| 72 61 6d 2b 31 3b 09 09 | 09 2f 2a 20 46 69 72 73 |ram+1;..|./* Firs|
|00005bf0| 74 20 42 52 41 4e 43 48 | 2e 20 2a 2f 0a 09 69 66 |t BRANCH|. */..if|
|00005c00| 20 28 4f 50 28 72 65 67 | 6e 65 78 74 28 73 63 61 | (OP(reg|next(sca|
|00005c10| 6e 29 29 20 3d 3d 20 45 | 4e 44 29 20 7b 09 09 2f |n)) == E|ND) {../|
|00005c20| 2a 20 4f 6e 6c 79 20 6f | 6e 65 20 74 6f 70 2d 6c |* Only o|ne top-l|
|00005c30| 65 76 65 6c 20 63 68 6f | 69 63 65 2e 20 2a 2f 0a |evel cho|ice. */.|
|00005c40| 09 09 73 63 61 6e 20 3d | 20 4f 50 45 52 41 4e 44 |..scan =| OPERAND|
|00005c50| 28 73 63 61 6e 29 3b 0a | 0a 09 09 2f 2a 20 53 74 |(scan);.|.../* St|
|00005c60| 61 72 74 69 6e 67 2d 70 | 6f 69 6e 74 20 69 6e 66 |arting-p|oint inf|
|00005c70| 6f 2e 20 2a 2f 0a 09 09 | 69 66 20 28 4f 50 28 73 |o. */...|if (OP(s|
|00005c80| 63 61 6e 29 20 3d 3d 20 | 45 58 41 43 54 4c 59 29 |can) == |EXACTLY)|
|00005c90| 0a 09 09 09 72 2d 3e 72 | 65 67 73 74 61 72 74 20 |....r->r|egstart |
|00005ca0| 3d 20 2a 4f 50 45 52 41 | 4e 44 28 73 63 61 6e 29 |= *OPERA|ND(scan)|
|00005cb0| 3b 0a 09 09 65 6c 73 65 | 20 69 66 20 28 4f 50 28 |;...else| if (OP(|
|00005cc0| 73 63 61 6e 29 20 3d 3d | 20 42 4f 4c 29 0a 09 09 |scan) ==| BOL)...|
|00005cd0| 09 72 2d 3e 72 65 67 61 | 6e 63 68 2b 2b 3b 0a 0a |.r->rega|nch++;..|
|00005ce0| 09 09 2f 2a 0a 09 09 20 | 2a 20 49 66 20 74 68 65 |../*... |* If the|
|00005cf0| 72 65 27 73 20 73 6f 6d | 65 74 68 69 6e 67 20 65 |re's som|ething e|
|00005d00| 78 70 65 6e 73 69 76 65 | 20 69 6e 20 74 68 65 20 |xpensive| in the |
|00005d10| 72 2e 65 2e 2c 20 66 69 | 6e 64 20 74 68 65 0a 09 |r.e., fi|nd the..|
|00005d20| 09 20 2a 20 6c 6f 6e 67 | 65 73 74 20 6c 69 74 65 |. * long|est lite|
|00005d30| 72 61 6c 20 73 74 72 69 | 6e 67 20 74 68 61 74 20 |ral stri|ng that |
|00005d40| 6d 75 73 74 20 61 70 70 | 65 61 72 20 61 6e 64 20 |must app|ear and |
|00005d50| 6d 61 6b 65 20 69 74 20 | 74 68 65 0a 09 09 20 2a |make it |the... *|
|00005d60| 20 72 65 67 6d 75 73 74 | 2e 20 20 52 65 73 6f 6c | regmust|. Resol|
|00005d70| 76 65 20 74 69 65 73 20 | 69 6e 20 66 61 76 6f 72 |ve ties |in favor|
|00005d80| 20 6f 66 20 6c 61 74 65 | 72 20 73 74 72 69 6e 67 | of late|r string|
|00005d90| 73 2c 20 73 69 6e 63 65 | 0a 09 09 20 2a 20 74 68 |s, since|... * th|
|00005da0| 65 20 72 65 67 73 74 61 | 72 74 20 63 68 65 63 6b |e regsta|rt check|
|00005db0| 20 77 6f 72 6b 73 20 77 | 69 74 68 20 74 68 65 20 | works w|ith the |
|00005dc0| 62 65 67 69 6e 6e 69 6e | 67 20 6f 66 20 74 68 65 |beginnin|g of the|
|00005dd0| 20 72 2e 65 2e 0a 09 09 | 20 2a 20 61 6e 64 20 61 | r.e....| * and a|
|00005de0| 76 6f 69 64 69 6e 67 20 | 64 75 70 6c 69 63 61 74 |voiding |duplicat|
|00005df0| 69 6f 6e 20 73 74 72 65 | 6e 67 74 68 65 6e 73 20 |ion stre|ngthens |
|00005e00| 63 68 65 63 6b 69 6e 67 | 2e 20 20 4e 6f 74 20 61 |checking|. Not a|
|00005e10| 0a 09 09 20 2a 20 73 74 | 72 6f 6e 67 20 72 65 61 |... * st|rong rea|
|00005e20| 73 6f 6e 2c 20 62 75 74 | 20 73 75 66 66 69 63 69 |son, but| suffici|
|00005e30| 65 6e 74 20 69 6e 20 74 | 68 65 20 61 62 73 65 6e |ent in t|he absen|
|00005e40| 63 65 20 6f 66 20 6f 74 | 68 65 72 73 2e 0a 09 09 |ce of ot|hers....|
|00005e50| 20 2a 2f 0a 09 09 69 66 | 20 28 66 6c 61 67 73 26 | */...if| (flags&|
|00005e60| 53 50 53 54 41 52 54 29 | 20 7b 0a 09 09 09 6c 6f |SPSTART)| {....lo|
|00005e70| 6e 67 65 73 74 20 3d 20 | 4e 55 4c 4c 3b 0a 09 09 |ngest = |NULL;...|
|00005e80| 09 6c 65 6e 20 3d 20 30 | 3b 0a 09 09 09 66 6f 72 |.len = 0|;....for|
|00005e90| 20 28 3b 20 73 63 61 6e | 20 21 3d 20 4e 55 4c 4c | (; scan| != NULL|
|00005ea0| 3b 20 73 63 61 6e 20 3d | 20 72 65 67 6e 65 78 74 |; scan =| regnext|
|00005eb0| 28 73 63 61 6e 29 29 0a | 09 09 09 09 69 66 20 28 |(scan)).|....if (|
|00005ec0| 4f 50 28 73 63 61 6e 29 | 20 3d 3d 20 45 58 41 43 |OP(scan)| == EXAC|
|00005ed0| 54 4c 59 20 26 26 20 28 | 28 69 6e 74 29 20 73 74 |TLY && (|(int) st|
|00005ee0| 72 6c 65 6e 28 4f 50 45 | 52 41 4e 44 28 73 63 61 |rlen(OPE|RAND(sca|
|00005ef0| 6e 29 29 29 20 3e 3d 20 | 6c 65 6e 29 20 7b 0a 09 |n))) >= |len) {..|
|00005f00| 09 09 09 09 6c 6f 6e 67 | 65 73 74 20 3d 20 4f 50 |....long|est = OP|
|00005f10| 45 52 41 4e 44 28 73 63 | 61 6e 29 3b 0a 09 09 09 |ERAND(sc|an);....|
|00005f20| 09 09 6c 65 6e 20 3d 20 | 73 74 72 6c 65 6e 28 4f |..len = |strlen(O|
|00005f30| 50 45 52 41 4e 44 28 73 | 63 61 6e 29 29 3b 0a 09 |PERAND(s|can));..|
|00005f40| 09 09 09 7d 0a 09 09 09 | 72 2d 3e 72 65 67 6d 75 |...}....|r->regmu|
|00005f50| 73 74 20 3d 20 6c 6f 6e | 67 65 73 74 3b 0a 09 09 |st = lon|gest;...|
|00005f60| 09 72 2d 3e 72 65 67 6d | 6c 65 6e 20 3d 20 6c 65 |.r->regm|len = le|
|00005f70| 6e 3b 0a 09 09 7d 0a 09 | 7d 0a 0a 09 72 65 74 75 |n;...}..|}...retu|
|00005f80| 72 6e 28 72 29 3b 0a 7d | 0a 0a 2f 2a 0a 20 2d 20 |rn(r);.}|../*. - |
|00005f90| 72 65 67 20 2d 20 72 65 | 67 75 6c 61 72 20 65 78 |reg - re|gular ex|
|00005fa0| 70 72 65 73 73 69 6f 6e | 2c 20 69 2e 65 2e 20 6d |pression|, i.e. m|
|00005fb0| 61 69 6e 20 62 6f 64 79 | 20 6f 72 20 70 61 72 65 |ain body| or pare|
|00005fc0| 6e 74 68 65 73 69 7a 65 | 64 20 74 68 69 6e 67 0a |nthesize|d thing.|
|00005fd0| 20 2a 0a 20 2a 20 43 61 | 6c 6c 65 72 20 6d 75 73 | *. * Ca|ller mus|
|00005fe0| 74 20 61 62 73 6f 72 62 | 20 6f 70 65 6e 69 6e 67 |t absorb| opening|
|00005ff0| 20 70 61 72 65 6e 74 68 | 65 73 69 73 2e 0a 20 2a | parenth|esis.. *|
|00006000| 0a 20 2a 20 43 6f 6d 62 | 69 6e 69 6e 67 20 70 61 |. * Comb|ining pa|
|00006010| 72 65 6e 74 68 65 73 69 | 73 20 68 61 6e 64 6c 69 |renthesi|s handli|
|00006020| 6e 67 20 77 69 74 68 20 | 74 68 65 20 62 61 73 65 |ng with |the base|
|00006030| 20 6c 65 76 65 6c 20 6f | 66 20 72 65 67 75 6c 61 | level o|f regula|
|00006040| 72 20 65 78 70 72 65 73 | 73 69 6f 6e 0a 20 2a 20 |r expres|sion. * |
|00006050| 69 73 20 61 20 74 72 69 | 66 6c 65 20 66 6f 72 63 |is a tri|fle forc|
|00006060| 65 64 2c 20 62 75 74 20 | 74 68 65 20 6e 65 65 64 |ed, but |the need|
|00006070| 20 74 6f 20 74 69 65 20 | 74 68 65 20 74 61 69 6c | to tie |the tail|
|00006080| 73 20 6f 66 20 74 68 65 | 20 62 72 61 6e 63 68 65 |s of the| branche|
|00006090| 73 20 74 6f 20 77 68 61 | 74 0a 20 2a 20 66 6f 6c |s to wha|t. * fol|
|000060a0| 6c 6f 77 73 20 6d 61 6b | 65 73 20 69 74 20 68 61 |lows mak|es it ha|
|000060b0| 72 64 20 74 6f 20 61 76 | 6f 69 64 2e 0a 20 2a 2f |rd to av|oid.. */|
|000060c0| 0a 73 74 61 74 69 63 20 | 63 68 61 72 20 2a 0a 72 |.static |char *.r|
|000060d0| 65 67 28 70 61 72 65 6e | 2c 20 66 6c 61 67 70 2c |eg(paren|, flagp,|
|000060e0| 20 72 63 73 74 61 74 65 | 29 0a 69 6e 74 20 70 61 | rcstate|).int pa|
|000060f0| 72 65 6e 3b 09 09 09 2f | 2a 20 50 61 72 65 6e 74 |ren;.../|* Parent|
|00006100| 68 65 73 69 7a 65 64 3f | 20 2a 2f 0a 69 6e 74 20 |hesized?| */.int |
|00006110| 2a 66 6c 61 67 70 3b 0a | 73 74 72 75 63 74 20 72 |*flagp;.|struct r|
|00006120| 65 67 63 6f 6d 70 5f 73 | 74 61 74 65 20 2a 72 63 |egcomp_s|tate *rc|
|00006130| 73 74 61 74 65 3b 0a 7b | 0a 09 72 65 67 69 73 74 |state;.{|..regist|
|00006140| 65 72 20 63 68 61 72 20 | 2a 72 65 74 3b 0a 09 72 |er char |*ret;..r|
|00006150| 65 67 69 73 74 65 72 20 | 63 68 61 72 20 2a 62 72 |egister |char *br|
|00006160| 3b 0a 09 72 65 67 69 73 | 74 65 72 20 63 68 61 72 |;..regis|ter char|
|00006170| 20 2a 65 6e 64 65 72 3b | 0a 09 72 65 67 69 73 74 | *ender;|..regist|
|00006180| 65 72 20 69 6e 74 20 70 | 61 72 6e 6f 20 3d 20 30 |er int p|arno = 0|
|00006190| 3b 0a 09 69 6e 74 20 66 | 6c 61 67 73 3b 0a 0a 09 |;..int f|lags;...|
|000061a0| 2a 66 6c 61 67 70 20 3d | 20 48 41 53 57 49 44 54 |*flagp =| HASWIDT|
|000061b0| 48 3b 09 2f 2a 20 54 65 | 6e 74 61 74 69 76 65 6c |H;./* Te|ntativel|
|000061c0| 79 2e 20 2a 2f 0a 0a 09 | 2f 2a 20 4d 61 6b 65 20 |y. */...|/* Make |
|000061d0| 61 6e 20 4f 50 45 4e 20 | 6e 6f 64 65 2c 20 69 66 |an OPEN |node, if|
|000061e0| 20 70 61 72 65 6e 74 68 | 65 73 69 7a 65 64 2e 20 | parenth|esized. |
|000061f0| 2a 2f 0a 09 69 66 20 28 | 70 61 72 65 6e 29 20 7b |*/..if (|paren) {|
|00006200| 0a 09 09 69 66 20 28 72 | 63 73 74 61 74 65 2d 3e |...if (r|cstate->|
|00006210| 72 65 67 6e 70 61 72 20 | 3e 3d 20 4e 53 55 42 45 |regnpar |>= NSUBE|
|00006220| 58 50 29 0a 09 09 09 46 | 41 49 4c 28 22 74 6f 6f |XP)....F|AIL("too|
|00006230| 20 6d 61 6e 79 20 28 29 | 22 29 3b 0a 09 09 70 61 | many ()|");...pa|
|00006240| 72 6e 6f 20 3d 20 72 63 | 73 74 61 74 65 2d 3e 72 |rno = rc|state->r|
|00006250| 65 67 6e 70 61 72 3b 0a | 09 09 72 63 73 74 61 74 |egnpar;.|..rcstat|
|00006260| 65 2d 3e 72 65 67 6e 70 | 61 72 2b 2b 3b 0a 09 09 |e->regnp|ar++;...|
|00006270| 72 65 74 20 3d 20 72 65 | 67 6e 6f 64 65 28 4f 50 |ret = re|gnode(OP|
|00006280| 45 4e 2b 70 61 72 6e 6f | 2c 72 63 73 74 61 74 65 |EN+parno|,rcstate|
|00006290| 29 3b 0a 09 7d 20 65 6c | 73 65 0a 09 09 72 65 74 |);..} el|se...ret|
|000062a0| 20 3d 20 4e 55 4c 4c 3b | 0a 0a 09 2f 2a 20 50 69 | = NULL;|.../* Pi|
|000062b0| 63 6b 20 75 70 20 74 68 | 65 20 62 72 61 6e 63 68 |ck up th|e branch|
|000062c0| 65 73 2c 20 6c 69 6e 6b | 69 6e 67 20 74 68 65 6d |es, link|ing them|
|000062d0| 20 74 6f 67 65 74 68 65 | 72 2e 20 2a 2f 0a 09 62 | togethe|r. */..b|
|000062e0| 72 20 3d 20 72 65 67 62 | 72 61 6e 63 68 28 26 66 |r = regb|ranch(&f|
|000062f0| 6c 61 67 73 2c 72 63 73 | 74 61 74 65 29 3b 0a 09 |lags,rcs|tate);..|
|00006300| 69 66 20 28 62 72 20 3d | 3d 20 4e 55 4c 4c 29 0a |if (br =|= NULL).|
|00006310| 09 09 72 65 74 75 72 6e | 28 4e 55 4c 4c 29 3b 0a |..return|(NULL);.|
|00006320| 09 69 66 20 28 72 65 74 | 20 21 3d 20 4e 55 4c 4c |.if (ret| != NULL|
|00006330| 29 0a 09 09 72 65 67 74 | 61 69 6c 28 72 65 74 2c |)...regt|ail(ret,|
|00006340| 20 62 72 29 3b 09 2f 2a | 20 4f 50 45 4e 20 2d 3e | br);./*| OPEN ->|
|00006350| 20 66 69 72 73 74 2e 20 | 2a 2f 0a 09 65 6c 73 65 | first. |*/..else|
|00006360| 0a 09 09 72 65 74 20 3d | 20 62 72 3b 0a 09 69 66 |...ret =| br;..if|
|00006370| 20 28 21 28 66 6c 61 67 | 73 26 48 41 53 57 49 44 | (!(flag|s&HASWID|
|00006380| 54 48 29 29 0a 09 09 2a | 66 6c 61 67 70 20 26 3d |TH))...*|flagp &=|
|00006390| 20 7e 48 41 53 57 49 44 | 54 48 3b 0a 09 2a 66 6c | ~HASWID|TH;..*fl|
|000063a0| 61 67 70 20 7c 3d 20 66 | 6c 61 67 73 26 53 50 53 |agp |= f|lags&SPS|
|000063b0| 54 41 52 54 3b 0a 09 77 | 68 69 6c 65 20 28 2a 72 |TART;..w|hile (*r|
|000063c0| 63 73 74 61 74 65 2d 3e | 72 65 67 70 61 72 73 65 |cstate->|regparse|
|000063d0| 20 3d 3d 20 27 7c 27 29 | 20 7b 0a 09 09 72 63 73 | == '|')| {...rcs|
|000063e0| 74 61 74 65 2d 3e 72 65 | 67 70 61 72 73 65 2b 2b |tate->re|gparse++|
|000063f0| 3b 0a 09 09 62 72 20 3d | 20 72 65 67 62 72 61 6e |;...br =| regbran|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.